Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

eInvoice AR MYS API Documentation

Download as pdf or txt
Download as pdf or txt
You are on page 1of 14

pg.

1 | C o n f i d e n t i a l – T a x i l l a I T S o l u t i o n s P v t L t d
Version History

Version No Date Changes Made


1.0 27/03/2024 Document creation

Table of Contents

Contents
1.0 Introduction ................................................................................................................ 3
2.0 API Overview ................................................................................................................ 3
3.0 Authentication API ....................................................................................................... 4
3.1 API Request ................................................................................................................... 4
3.2 API Response: ................................................................................................................ 4
4.0 Post Invoice API ................................................................................................................. 5
4.1 API Request: .................................................................................................................. 5
4.2 API Response ................................................................................................................. 8
5.0 Get Invoice Status.............................................................................................................. 9
5.1 API Request ................................................................................................................... 9
5.2 API Response ................................................................................................................. 9
6.0 Get Invoice PDF ............................................................................................................... 11
6.1 API Request ................................................................................................................. 11
6.2 API response ................................................................................................................ 12
7.0 Cancel Invoice API ........................................................................................................... 13
7.1 API Request: ................................................................................................................ 13
7.2 API Response ......................................................................................................... 13

pg. 2 | C o n f i d e n t i a l – T a x i l l a I T S o l u t i o n s P v t L t d
1.0 Introduction
Taxilla, a cutting-edge Regulatory Technology (Reg-Tech) platform, serves as a comprehensive
solution for businesses seeking seamless integration, meticulous transformation, rigorous
validation, and precise management of computation rules. With its robust suite of capabilities,
Taxilla empowers organizations to navigate complex regulatory landscapes with confidence and
efficiency.

One of Taxilla's flagship offerings is its enInvoice solution, tailored specifically for electronic
invoicing (e-Invoicing) needs. Developed with a keen understanding of regulatory requirements,
enInvoice ensures full compliance with the e-Invoice standards set forth by the Inland Revenue
Board of Malaysia (IRBM). By leveraging enInvoice, businesses can streamline their invoicing
processes while adhering to regulatory mandates, thus minimizing compliance risks and
enhancing operational efficiency.

Furthermore, Taxilla extends its support to developers by providing a comprehensive Postman


collection. This collection includes a curated set of API calls and corresponding credentials,
offering developers the tools they need to seamlessly integrate their systems or any Enterprise
Resource Planning (ERP) / Accounting software with Taxilla's platform. By simplifying the
integration process and providing necessary resources, Taxilla empowers developers to unlock
the full potential of their applications and systems, leveraging Taxilla's robust infrastructure and
capabilities via APIs..

2.0 API Overview


The APIs facilitate communication between taxpayers and the eInvoice generation system. This
section outlines the standards and formats that will define the APIs exposed by e-Invoice systems.
E-Invoice APIs will be implemented as RESTful web services.

The table below details the URL pattern to be utilized in defining API endpoints

API URL https://api.taxilla.com


HTTP Method GET To fetch data from enInvoice system
POST To submit data to enInvoice system

pg. 3 | C o n f i d e n t i a l – T a x i l l a I T S o l u t i o n s P v t L t d
3.0 Authentication API
To establish successful communication with Taxilla, users must generate access tokens using the
provided authentication credentials, which include the

• client_id
• client_secret

3.1 API Request


Below are the format and details required to generate an access token:

Method: POST

URL: https://live.taxilla.com/oauth2/v1/token Request Headers:

Content-Type: application/x-www-form-urlencoded

Content-Length: <calculated when request is sent>

Host: <calculated when request is sent>

Request Body:

Key Value
grant_type client_credentials
client_id **********
client_secret ***********

Taxilla team will provide information to respective developer in getting.

• client_id
• client_secret

3.2 API Response:


The API response will be in JSON format. Sample responses are mentioned below.

Success Response:

{
"access_token": "c1e4ca81-4f99-4e02-9599-252687c90ba8",
"scope": [],
"resourceOwnerId": "5a90aef6-6a4f-4168-b108-bc15e85d5324",
"token_type": "bearer",
"expires_in": 83395,
"orgId": "ca7386d0-7d0b-4069-961c-7a6ffc488066"
}

pg. 4 | C o n f i d e n t i a l – T a x i l l a I T S o l u t i o n s P v t L t d
Failure Response:

{
"timestamp": "27-03-2024 10:58:36 AM",
"path": "/oauth2/v1/token",
"status": "BAD_REQUEST",
"success": false,
"taxillaErrorCode": "BAD_REQUEST",
"msg": "Client does not exists with the provided details"
}

The access token received in the successful response should be utilized when posting or
downloading invoices via the following APIs.

4.0 Post Invoice API


This API is designed and intended for the purpose of submitting invoices to the Taxilla platform. It
serves as the designated mechanism through which users can transmit their invoice data to Taxilla
for processing and further handling within the system.

4.1 API Request:

The format and details required to post invoice in JSON format to Taxilla are mentioned below:

• Method: POST
• URL:https://live.taxilla.com/process/v1/einvoicearmys?autoExecuteRules=true&tra
nsformationName=eInvoice-Malaysia-Json-MY
• Authorization:
o Type: Bearer Token
o Value: Provide access_token generated through API provided in section 3
o Request Headers:
▪ Content-Type: application/json
o Request Body: Invoice data must be posted in JSON structure mentioned
below:
• [
• {
• "FinancialYear": "2024",
• "ReferenceNumber": "TEST-INVOICE-0127",

pg. 5 | C o n f i d e n t i a l – T a x i l l a I T S o l u t i o n s P v t L t d
• "SupplyType": "B2B",
• "InvoiceType": "01",
• "InvoiceNumber": "TEST-INVOICE-0127",
• "IRBMLink": "",
• "IRBMNumber": "",
• "IRBMUniqueIdentifierNumber": "16",
• "eInvoiceDateandTime": "13/10/2023",
• "eInvoiceVersion": "10",
• "OriginaleInvoiceReferenceNumber": "567",
• "InvoiceCurrencyCode": "MYR",
• "CurrencyExchangeRate": "10",
• "FrequencyofBilling": "01",
• "BillingPeriod": "",
• "SupplierCode": "",
• "SupplierName": "AMS Setia Jaya Sdn. Bhd",
• "SupplierTIN": "C25845632022",
• "SupplierRegistration": "201901234567",
• "SupplierMyKadNumber": "16",
• "PassportNumber": "097",
• "SupplierSSTRegistrationNumber": "Supplier23",
• "SupplierTourismTaxRegistrationNumber": "Supplier23",
• "SupplierMSICCode": "10712",
• "SupplierBusinessActivityDescription": "Manufacturing of
Automotive parts",
• "SupplierAddressField1": "Seller Address Field 1 | Medan Alamat
Penjual 1",
• "SupplierAddressField2": "Seller Address Field 2 | Medan Alamat
Penjual 2",
• "SupplierAddressField3": "Seller Address Field 3 | Medan Alamat
Penjual 3",
• "SupplierPostalCode": "10003 | 10003",
• "SupplierCity": "Kuala Lumpur | Kuala Lumpur",
• "SupplierState": "MA",
• "SupplierCountry": "SAU",
• "SupplierContactNumber": "60312345645",
• "Supplieremail": "gen@supplier.com",
• "BuyerCode": "",
• "BuyerName": "Setia Jay Sdn. Bhd",
• "BuyerTIN": "C25845632022",
• "BuyerMyKadNumber": "1234",
• "BuyerPassportNumber": "0987",
• "BuyerRegistration": "Buyer23",
• "BuyerSSTRegistrationNumber": "Buyer23",
• "Buyeremail": "eneral.ams@supplier.com",
• "BuyerAddressField1": "Buyer Address Field 1 | Medan Alamat
Pembeli 1",
• "BuyerAddressField2": "Buyer Address Field 2 | Medan Alamat
Pembeli 2",

pg. 6 | C o n f i d e n t i a l – T a x i l l a I T S o l u t i o n s P v t L t d
• "BuyerAddressField3": "Buyer Address Field 3 | Medan Alamat
Pembeli 3",
• "BuyerPostalCode": "10003 | 10003",
• "BuyerCity": "Kuala Lumpur | Kuala Lumpur",
• "BuyerState": "MA",
• "BuyerCountry": "SAU",
• "BuyerContactNumber": "60312345645",
• "ShippingRecipientsName": "",
• "ShippingRecipientTIN": "",
• "ShippingMyKadNumber": "1234",
• "ShippingPassportNumber": "0987",
• "ShippingRegistration": "Buyer23",
• "ShippingReferenceNumber": "",
• "ShippingAddressField1": "Address Field 1",
• "ShippingAddressField2": "Address Field 2",
• "ShippingAddressField3": "Address Field 3",
• "ShippingPostalCode": "10003",
• "ShippingCity": "Malayasia",
• "ShippingState": "MA",
• "ShippingCountry": "SAU",
• "IncoTerms": "",
• "ProductTariffCode": "",
• "FTAInformation": "",
• "AuthorisationNumberforCertifiedExporter": "",
• "ReferenceNumberofCustomsFormNo2": "",
• "CountryofOrigin": "",
• "DetailsofOtherCharges": "",
• "TotalInvoiceAmount": "44",
• "TotalTaxableAmount": "86",
• "TotalTaxAmount": "87",
• "TotalDiscountAmount": "45",
• "RoundingofAmount": "134",
• "PrepaidAmount": "67",
• "AmounttobePaid": "45",
• "InvoiceLineItemDetails": [
• {
• "LineItemIdentifier": "1",
• "Classification": "001",
• "DescriptionofProductorService": "Automotive products -
Exhaust",
• "UnitPrice": "100.00",
• "TaxType": "01",
• "TaxRate": "07",
• "TaxAmount": "10",
• "DetailsofTaxExemption": "129",
• "AmountExemptedfromTax": "78",
• "Subtotal": "23",
• "TotalExcludingTax": "999.00",

pg. 7 | C o n f i d e n t i a l – T a x i l l a I T S o l u t i o n s P v t L t d
• "TotalIncludingTax": "1000.00",
• "Quantity": "10.00",
• "Measurement": "10",
• "DiscountRate": "0",
• "DiscountAmount": "109"
• }
• ],
• "PaymentDetails": [
• {
• "PaymentMode": "1",
• "SupplierBankAccountNumber": "1269",
• "PaymentTerms": "PaymentTerms",
• "PaymentAmount": "100",
• "PaymentDate": "12/12/2023",
• "PaymentReferenceNumber": "1",
• "BillReferenceNumber": "12"
• }
• ]
• }
• ]

Note:
• The description of the JSON fields can be found in the metadata sheet provided.
• JSON mentioned in request body is as per Taxilla’s standard structure.
• Customers can also choose their own JSON structure during the
implementation.
• Each request must have unique combination of
o ReferenceNumber
o FinancialYear
o InvoiceType
• ReferenceNumber must be unique document identified generated in the
source system
• Financial Year must be the year to which the document belongs.
• InvoiceType must have values either of 01, 02, 03 and 04 based on invoicetype as
mentioned below:

Code Invoice Type


01 Invoice
02 Credit Note
4.2 API Response 03 Debit Note
The API response will be in 04 Refund Note JSON format. Sample
responses are mentioned 11 Self-Billed Invoice below.
12 Self-Billed Credit Note
Success Response
13 Self-Billed Debit Note
{ 14 Self-Billed Refund Note

pg. 8 | C o n f i d e n t i a l – T a x i l l a I T S o l u t i o n s P v t L t d
"msg": "Request created successfully",
"response": {
"requestId": "b29339a0-ec17-11ee-878b-d75c92e6d298"
}
}

Failure Response

{
"timestamp": "27-03-2024 12:13:16 PM",
"path": "/process/v1/einvoicearmysnewua",
"status": "NOT_FOUND",
"taxillaErrorCode": "RESOURCE_NOT_FOUND",
"msg": "Invalid Service einvoicearmysnewua."
}

5.0 Get Invoice Status


This API is specifically designed and intended to retrieve the status of invoices that have been
posted to the eInvoice-AR-MYS system.

5.1 API Request


The format and details required to post invoice in JSON format to Taxilla are mentioned below:

• Method: GET
• URL: https://live.taxilla.com/process/v1/einvoicearmys/reports/eInvoice-AR-MYS-
Json-Outbound?referencenumber=TEST-INVOICE-
0123&einvoicetype_header=Invoice&financialyear=2023
• Authorization:
o Type: Bearer Token
o Value: Provide access_token generated through API provided in section 3
• Headers:
o Content-Type: application/json
• Params:
referencenumber Reference Number of the Invoice
einvoicetype_header Type of the invoice
financialyear Financial Year

5.2 API Response


Success Response

pg. 9 | C o n f i d e n t i a l – T a x i l l a I T S o l u t i o n s P v t L t d
[
{
"FinancialYear": "2023",
"ReferenceNumber": "TEST-INVOICE-0123",
"SupplyType": "B2B",
"InvoiceType": "Invoice",
"InvoiceNumber": "TEST-INVOICE-0123",
"IRBMUniqueIdentifierNumber": "2adc5139-e91e-4619-b3e9-1fc893ebd034",
"eInvoiceDateandTime": "13/10/2023",
"eInvoiceVersion": "10",
"OriginaleInvoiceReferenceNumber": "567",
"InvoiceCurrencyCode": "MYR",
"CurrencyExchangeRate": "10.00",
"FrequencyofBilling": "01",
"SupplierName": "AMS Setia Jaya Sdn. Bhd",
"BuyerName": "Setia Jay Sdn. Bhd",
"TotalInvoiceAmount": "44.00",
"TotalTaxableAmount": "86.00",
"TotalTaxAmount": "87.00",
"TotalDiscountAmount": "45.00",
"RoundingofAmount": "134.00",
"PrepaidAmount": "67.00",
"AmounttobePaid": "45.00",
"ErrorMessage": "",
"IsSuccess": "True",
"ErrorFrom": "",
"InvoiceLineItemDetails": [
{
"LineItemIdentifier": "1",
"Classification": "001",
"DescriptionofProductorService": "Automotive products - Exhaust",
"UnitPrice": "100.00",
"TaxType": "01",
"TaxRate": "7.00",
"TaxAmount": "70.00",
"DetailsofTaxExemption": "129",
"AmountExemptedfromTax": "78.00",
"Subtotal": "1000.00",
"TotalExcludingTax": "999.00",
"TotalIncludingTax": "1069.0",
"Quantity": "10.00",
"Measurement": "10",
"DiscountRate": "0.00",
"DiscountAmount": "109.00"
}
],
"PaymentDetails": [
{

pg. 10 | C o n f i d e n t i a l – T a x i l l a I T S o l u t i o n s P v t L t d
"PaymentMode": "1",
"SupplierBankAccountNumber": "1269",
"PaymentTerms": "PaymentTerms",
"PaymentAmount": "100.00",
"PaymentDate": "12/12/2023",
"PaymentReferenceNumber": "1",
"BillReferenceNumber": "12"
}
]
}
]

Failure Response

{
"timestamp": "27-03-2024 12:27:37 PM",
"path": "/process/v1/einvoicearmys/reports/eInvoice-AR-MYS-Json-Outbound",
"status": "BAD_REQUEST",
"taxillaErrorCode": "BAD_REQUEST",
"msg": "No Requests Exists for provided Business Keys"
}

6.0 Get Invoice PDF


This API is specifically designed and intended to retrieve the invoice PDF generated by Taxilla for
invoices posted to the eInvoice-AR-MYS system.

6.1 API Request


The format and details required to get invoice PDF from Taxilla are mentioned below:

• Method: GET
• URL: https://live.taxilla.com/process/v1/einvoicearmys/reports/Standard-Invoice
• Authorization:
o Type: Bearer Token
o Value: Provide access_token generated through API provided in section 3
• Headers:
o Content-Type: application/json
• Params:
referencenumber Reference Number of the Invoice
einvoicetype_header Type of the invoice
financialyear Financial Year

pg. 11 | C o n f i d e n t i a l – T a x i l l a I T S o l u t i o n s P v t L t d
6.2 API response
Success Response

Failure Response

{
"timestamp": "27-03-2024 12:27:37 PM",
"path": "/process/v1/einvoicearmys/reports/eInvoice-AR-MYS-Json-Outbound",
"status": "BAD_REQUEST",
"taxillaErrorCode": "BAD_REQUEST",
"msg": "No Requests Exists for provided Business Keys"
}

pg. 12 | C o n f i d e n t i a l – T a x i l l a I T S o l u t i o n s P v t L t d
7.0 Cancel Invoice API
This API has been meticulously crafted with a clear intention: to provide users with a seamless
mechanism for canceling invoices that have already been submitted to the Taxilla platform.
Whether due to errors, changes in circumstances, or other reasons necessitating the cancellation
of an invoice, this API empowers users to efficiently manage their invoicing processes. By leveraging
this functionality, users can swiftly retract previously submitted invoices, ensuring accuracy and
integrity within their financial operations conducted via the Taxilla platform.

7.1 API Request:


The format and details required to post invoice in JSON format to Taxilla are mentioned below:

• Method: POST
• URL:https://live.taxilla.com/process/v1/einvoicearmys?autoExecuteRules=true&tra
nsformationName=Cancel-Invoice-JSON
• Authorization:
o Type: Bearer Token
o Value: Provide access_token generated through API provided in section 3
o Request Headers:
▪ Content-Type: application/json
o Request Body: Invoice data must be posted in JSON structure mentioned
below:
• {
• "einvoicetype_header": "01",
• "financialyear": 2024,
• "referencenumber": "TEST-INVOICE-0127",
• "reason": "Wrong Buyer Details"
• }

7.2 API Response


Success Response

{
"msg": "Request created successfully",
"response": {
"requestId": "1d2f8d90-ec18-11ee-878b-d75c92e6d298"
}
}
Failure Response

{
"timestamp": "27-03-2024 12:27:37 PM",
"path": "/process/v1/einvoicearmys/reports/eInvoice-AR-MYS-Json-Outbound",
"status": "BAD_REQUEST",
"taxillaErrorCode": "BAD_REQUEST",

pg. 13 | C o n f i d e n t i a l – T a x i l l a I T S o l u t i o n s P v t L t d
"msg": "No Requests Exists for provided Business Keys"
}

Note:

o To check if the invoice got canceled or not you can do the Get Invoice Status call mentioned
in section 5.0.

---------------------------------------------------END OF DOCUMENT-----------------------------------------------

pg. 14 | C o n f i d e n t i a l – T a x i l l a I T S o l u t i o n s P v t L t d

You might also like