Malaysia
Enabling support for Malaysia involves confirming prerequisites and product IDs, registering with the IRBM (Inland Revenue Board of Malaysia) tax authority, and setting up credentials or registering Sovos as an intermediary.
Prerequisites
Prerequisites differ according to integration:
- Intermediary
-
Register Sovos as an intermediary using MyInvois
Use the following values
Property Value TIN C58775637030 BRN 202401023235 Name UAT: SXXX_XXXXD. PROD: SOVOS COMPLIANCE SDN. BHD.
-
- Basic
-
Obtain the Client ID and Client Secret from the IRBM Portal
-
Obtain a signing certificate file and signing key ID from a Malaysian Certification Authority (CA)
-
To switch from Basic to Intermediary integration, contact the Sovos Professional Services team.
Resources
Official government resources that include detailed and valuable information on various topics:
Available products
- my_UBLInvoice__1.0
- Outbound electronic invoice
- my_UBLInvoice_Polling_1.0
- Inbound electronic invoice
Configure transmission credentials for Malaysia
To begin sending documents using Basic integration, you must set up transmission credentials to connect your Sovos account with Malaysia's Inland Revenue Board (IRBM).
Samples for uploading transmission credentials for Malaysia
The samples on this page show the request and response samples for uploading new transmission credentials using the dedicated Create settings endpoint.
Request sample
Request sample for uploading new transmissions credentials:
curl --location --request POST 'https://api-test.sovos.com/v2/configurations/organizations/YOUR-ORG-ID/settings' \
--header 'x-correlationId: developer-guide' \
--header 'Content-Type: application/json' \
--data-raw '[
{
"context": "transmission",
"configurations": [
{
"name": "partner_credentials_irbm",
"value": {
"client_id": INSERT-CLIENTID-HERE,
"client_secret": INSERT-SECRET-HERE
},
"scope": {
"category": "MY_INV",
"productId": "my_UBLInvoice__1.0",
"orgId": YOUR-ORG-ID,
"taxId": YOUR-COMPANY-TAXID
}
}
]
}
]'
Response sample
Response sample for uploading new transmissions credentials:
{
"status": 201,
"message": "Created",
"success": true,
"timestamp": 1664826411521,
"data": [
{
"message": "Configurations are created",
"statusCode": 201,
"configurationContextResponse": {
"context": "Transmission",
"configurations": [
{
"id": SETTING-ID,
"name": "partner_credentials_irbm",
"value": {
"client_id": INSERT-CLIENTID-HERE,
"client_secret": INSERT-CLIENTSECRET-HERE
},
"scope": {
"category": "MY_INV",
"productId": "my_UBLInvoice__1.0",
"orgId": YOUR-ORG-ID,
"taxId": YOUR-COMPANY-TAXID
},
"auditData": {
"createdAt": 1664826410,
"createdBy": "user@company.com",
"isDeleted": false,
"version": 1
}
}
]
}
}
]
}
Configure the signing credentials for Malaysia
Complete and return an Appointment Letter to Sovos, or your reseller.
Complete and return a Support and Change Management Document to Sovos, or your reseller.
Samples for uploading signing credentials for Malaysia
The request and response samples for uploading new signing credentials using the dedicated Create settings endpoint.
Request sample
Request sample for uploading new signing credentials:
curl --location --request POST 'https://api-test.sovos.com/v2/configurations/organizations/YOUR-ORG-ID/settings' \
--header 'x-correlationId: developer-guide' \
--data-raw '[
{
"context": "signing",
"configurations": [
{
"name": "credentials",
"value": {
"certificateFileData": INSERT-CERT-HERE,
"password": INSERT-PASSWORD-HERE
},
"scope": {
"category": "MY_INV",
"productId": "my_UBLInvoice__1.0",
"orgId": YOUR-ORG-ID,
"taxId": YOUR-COMPANY-TAXID
}
}
]
}
]'
Response sample
Response sample for uploading new signing credentials:
{
"status": 201,
"message": "Created",
"success": true,
"timestamp": 1667465886908,
"data": [
{
"message": "Configurations are created",
"statusCode": 201,
"configurationContextResponse": {
"context": "Signing",
"configurations": [
{
"id": SETTING-ID,
"name": "credentials",
"value": {
"certificateFileData": "*****",
"password": "*****"
},
"scope": {
"category": "MY_INV",
"productId": "my_UBLInvoice__1.0",
"orgId": YOUR-ORG-ID,
"taxId": YOUR-COMPANY-TAXIDhe
},
"auditData": {
"createdAt": 1667465886,
"createdBy": "user@company.com",
"isDeleted": false,
"version": 1
}
}
]
}
}
]
}
Issue invoice
Invoice clearance in Malaysia is based on the default business process, which follows this order: Mapping, Signing and Transmission.
The diagram below provides a detailed overview:
Step 1: Supplier Creates the Standard Business Document
Every invoice sent to Sovos must be part of a Standard Business Document (SBD). This document includes a Standard Business Document Header (SBDH) and a Sovos Document node, which includes a Sovos Canonical Invoice (SCI). To create the SBD, follow the detailed instructions in the SBDH, Sovos Document, and SCI pages.
Besides the SCI format, the payload can be also of Malaysian UBL 2.1 format. The structure of the Malaysian format is explained here.
Here is a list of supported e-Invoice types (InvoiceTypeCode):
-
Invoice (01)
-
Credit Note (02)
-
Debit Note (03)
-
Refund Note (04)
-
Self-billed Invoice (11)
-
Self-billed Credit Note (12)
-
Self-billed Debit Note (13)
-
Self-billed Refund Note (14)
Although not an e-Invoice type, consolidated invoices are also supported.
- SBDH - Invoice
- The Standard Business Document Header (SBDH) must use the following values when issuing a document in the SCI format:
Node Required Attributes Value StandardBusinessDocumentHeader.Sender.Identifier Yes Authority="MY" Supplier's tax ID StandardBusinessDocumentHeader.Receiver.Identifier Yes Authority="MY" StandardBusinessDocumentHeader.DocumentIdentification.Standard Yes urn:oasis:names:specification:ubl:schema:xsd:Invoice-2 StandardBusinessDocumentHeader.DocumentIdentification.TypeVersion Yes 2.1 StandardBusinessDocumentHeader.DocumentIdentification.Type Yes Invoice StandardBusinessDocumentHeader.BusinessScope.Scope (with child nodes) Yes Child node Type: Country
Child node Identifier: MY
StandardBusinessDocumentHeader.BusinessScope.Scope (with child nodes) Yes Child node Type: ProcessType
Child node Identifier: Outbound
StandardBusinessDocumentHeader.BusinessScope.Scope (with child nodes) Yes Child node Type: CompanyCode
Child node Identifier: Supplier's tax ID
StandardBusinessDocumentHeader.BusinessScope.Scope (with child nodes) Yes Child node Type: SenderDocumentId
Child node Identifier: A unique document ID, where the ERP document ID is recommended.
StandardBusinessDocumentHeader.BusinessScope.Scope (with child nodes) Yes Child node Type: SenderSystemId
Child node Identifier: The system ID configured in the backend. This parameter is used to determine which notifications are returned to the client and what attachments they include. If
SenderSystemId
is not configured on the client side, it'll assume the default value of "DefaultSystemERP". For more information, see this topic.StandardBusinessDocumentHeader.BusinessScope.Scope (with child nodes) Yes Child node Type: Mapping.OutputSchema
Child node Identifier: UBLInvoice
StandardBusinessDocumentHeader.BusinessScope.Scope (with child nodes) Yes Child node Type: Mapping.TransformDocument
Child node Identifier: SCI-TO-LEGAL_INVOICE
StandardBusinessDocumentHeader.BusinessScope.Scope (with child nodes) Yes Child node Type: Transmission.OperationType
Child node Identifier: SIGNING
StandardBusinessDocumentHeader.BusinessScope.Scope.BusinessService.BusinessServiceName Yes Default StandardBusinessDocumentHeader.BusinessScope.Scope (with child nodes) Yes Child node Type: BusinessCategory
Child node Identifier: B2B
SovosDocument.SovosCanonicalInvoice.Invoice Yes SCI StandardBusinessDocumentHeader.BusinessScope.Scope (with child nodes) Yes Child node Type: Version
Child node Identifier : 1.0
- Local format - Invoice
- Alternatively, the supplier can use the local format (XML) instead of SCI. Use the following values in the SBDH for documents that use the local format:
Node Required Value StandardBusinessDocumentHeader.BusinessScope.Scope (with child nodes) Yes Child node Type: Mapping.TransformDocument
Child node Identifier: LEGAL-TO-SCI_INVOICE
SovosDocument.SovosLegalDocument.Base64Document Yes A local format Note:The Local Format (XML) document needs to be Base64-encoded before it can be added to the SBD.
</sbd:StandardBusinessDocumentHeader> <svs:SovosDocument> <svs:SovosLegalDocument> <enc:Base64Document> <enc:EmbeddedDocument id="1" filename="invoice.xml" mimeCode="application/xml">PD94bWwgdmVyc...FRdHVyYT4NCg==<enc:EmbeddedDocument> </enc:Base64Document> </svs:SovosLegalDocument> </svs:SovosDocument> </sbd:StandardBusinessDocument>
Note:Include all the mandatory nodes as specified in the SBDH schema. If the information cannot be provided and the respective mandatory node has not been mentioned on the current page, the node can be left empty but must still be included in the SBDH.
- SBD Sample
- Below is a sample of the SBD. In addition, there's a full sample of the SBD in the Postman Samples page.Important:
If you have configured a certificate, the
listVersionID
attribute with value 1.1 needs to be provided for the nodeInvoiceTypeCode
.<cbc:InvoiceTypeCode listVersionID="1.1">
Currently, you don't need to sign documents to submit them to IRBM. If you don't have a certificate, you can use the following scope in the SBDH instead.
<cbc:InvoiceTypeCode listVersionID="1.0">
<sbd:StandardBusinessDocument xmlns="http://uri.etsi.org/01903/v1.4.1#" xmlns:cac="urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2" xmlns:cbc="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2" xmlns:sbd="http://www.unece.org/cefact/namespaces/StandardBusinessDocumentHeader" xmlns:xades="http://uri.etsi.org/01903/v1.3.2#" xmlns:ad="http://www.sovos.com/namespaces/additionalData" xmlns:sci="http://www.sovos.com/namespaces/sovosCanonicalInvoice" xmlns:svs="http://www.sovos.com/namespaces/sovosDocument" xmlns:sov="http://www.sovos.com/namespaces/sovosExtensions" xmlns:ds="http://www.w3.org/2000/09/xmldsig#" xmlns:ext="urn:oasis:names:specification:ubl:schema:xsd:CommonExtensionComponents-2" xmlns:inv="urn:oasis:names:specification:ubl:schema:xsd:Invoice-2"> <sbd:StandardBusinessDocumentHeader> ... <sbd:Scope> <sbd:Type>Transmission.OperationType</sbd:Type> <sbd:InstanceIdentifier/> <sbd:Identifier>SIGNING</sbd:Identifier> </sbd:Scope> ... </sbd:StandardBusinessDocumentHeader> <svs:SovosDocument> <sci:SovosCanonicalInvoice> <inv:Invoice> ... <cbc:InvoiceTypeCode listVersionID="1.1">...</cbc:InvoiceTypeCode> ... </inv:Invoice> </sci:SovosCanonicalInvoice> </svs:SovosDocument> </sbd:StandardBusinessDocument>
Step 2: Supplier sends the SBD to Sovos
The supplier sends a POST request to the /documents
endpoint. The request must include the following request body parameters:
Name | Type | Required | Description |
---|---|---|---|
data | string | Yes | Set to the SBD encoded in Base64, created in step 1. |
dataEncoding | string | Yes | Always set to "base64". |
- Request Sample
-
curl --location --request POST 'https://api-test.sovos.com/v1/documents' \ --header 'Content-Type: application/json' \ --header 'Authorization: Bearer TOKEN' \ --header 'x-correlationId: SET-TO-UNIQUE-VALUE' \ --data-raw '{ "data": "PD9...d4=", "dataEncoding" : "base64" }'
- Response Sample
-
{ "timestamp": 1605282724079, "status": 202, "success": true, "message": "Document Received", "data": { "documentId": "DOCUMENT-ID" } }
Step 3: Sovos Maps the SCI into XML
Upon receiving the SCI file, Sovos maps it into the required XML format.
This step will be skipped if the SBD contains the invoice in the local format (Malaysian UBL in XML representation supported only, not Malaysian UBL in JSON representation).
Step 4: Sovos validates the XML
Sovos performs schema validation based on the information provided by the Tax Authority. If there are errors in the document sent by the client, Sovos detects them instead of waiting for the Tax Authority's response.
Step 5: Sovos signs the XML
Sovos signs the file using the taxpayer's certificate, which generates the legalSigned
attachment .
Step 6: Sovos batches the XMLs
After the XML file is signed, the request is placed into a batch before being transmitted to IRBM.
The batch is transmitted after one of the following limits is met:
- Production
-
- Time limit: 5 minutes have passed since the batch was created.
-
Number of documents limit: 100 documents have been added to the batch.
-
Total size limit: 5MB of documents have been added to the batch.
Important:Documents need to be less than 300KB; otherwise, they will be rejected by Sovos.
- UAT
-
- Time limit: 1 minute has passed since the batch was created.
-
Number of documents limit: 100 documents have been added to the batch.
-
Total size limit: 5MB of documents have been added to the batch.
Important:Documents need to be less than 300KB; otherwise, they will be rejected by Sovos.
Step 7: Sovos Transmits the XML
Sovos transmits the batch to the Tax Authority's e-Invoice system (IRBM).
Step 8: IRBM Processes the XML
The IRBM system proceeds to validate the schema documents and verify that business logic, signature, taxpayer information and duplicates are checkedbefore returning a success message or rejection message indicating IRBM has approved the document.
The XML file is then also made available for the Counterparty to retrieve, and potentially reject, within 72 hours. If the Counterparty rejects the invoice, it is still considered active until the Taxpayer cancels the invoice separately or issues a Credit note/Debit note. After 72 hours of issuance, the Counterparty can still reject out-of-band and thus it is not implicitly accepted just because 72 hours have passed without a rejection.
Consolidated invoices cannot be rejected by the Counterparty.
Step 9: IRBM Sends the Response to Sovos
After performing its services, the IRBM system sends the response to Sovos.
Step 10: Taxpayer Retrieves the Application Responses
It is highly recommended that clients configure their Application Response attachments as download links instead of base64 encoded data to avoid potential size limitations when retrieving responses. The default option is download links.
-
Select download links to return a URL to access the file
-
Use binary data to embed the file directly in base64 format
This configuration is available through our Professional Services team.
After sending document, youwill receive a JSON response message with an HTTP status code of 202 (asynchronous transaction). This means that the supplier must retrieve the application responses that become available during the transaction, which provide status information and also contain the signed XML encoded in Base64 when it's available. Additionally, the following details included in the response must be considered.
Clients have the option to retrieve application responses (notifications) in one of two ways:
- Fetch everything in one single response (notification)
- When polling for responses, Sovos will only return one final notification with
SCICloudStatusCode 209
that contains all the relevant attachments/data.To complete a transaction, the supplier retrieves only one notification, with an
SCICloudStatusCode
of 209 and all the necessary attachments/data. The notification needs to be parsed for theSCIResponseCode
value. There are two possible values forSCIResponseCode
:-
"AP", meaning the document's compliance status has been accepted with all the necessary attachments/data present.
-
"RE", meaning the document's compliance status has been rejected and more parsing is needed:
-
if
SCIGovtStatusCode
is present, the error can be found by readingStatusReason
-
if
SCIInternalValidationCode
is present, the error can be found by readingStatusReason
-
Note:Receiving a notification containing
SCICloudStatusCode
with a value in the 5xx range, still remains an option as it indicates a server error. In this case, the workflow would not be considered complete since it would not return a notification withSCICloudStatusCode
of 209.SCICloudStatusCode SCIResponseCode Sample 209 AP
UBLExtensions
in theApplicationResponse
will contain:-
Uuid
- Assigned to each document accepted by IRBM. -
LongId
- Assigned to each document accepted by IRBM in order to allow for querying data anonymously. -
validationLink
- A link to be embedded into the QR code generated for human readable representation of the invoice. -
receptionDate
- The date and time when the document was submitted to IRBM.
Workflow successfully completed 209 RE Workflow successfully completed -
- Fetch multiple responses (notifications) containing different information
- When polling for responses, Sovos will return multiple notifications with different
SCICloudStatusCode
values containing different attachments/data until the final one (with status 209) is returned.To complete a transaction, the supplier must retrieve the application responses until the transaction has finished. If the supplier has subscribed to multiple notifications, the transaction can generate different application responses, as shown in the table below. The transaction finishes when a notification containing
SCICloudStatusCode
with value of 209 has been received.Note:Receiving a notification containing
SCICloudStatusCode
with a value in the 5xx range still remains an option as it indicates a server error. In this case the workflow would not complete and will not return a notification withSCICloudStatusCode
of 209.SCICloudStatusCode SCIResponseCode Sample 100 IP Document received successfully 101 IP Document mapped successfully 200 IP/AP Initially IP is sent and when the workflow finishes (after 72h) AP is sent.
UBLExtensions
in theApplicationResponse
will contain:-
Uuid
- Assigned to each document accepted by IRBM. -
LongId
- Assigned to each document accepted by IRBM to allow for querying data anonymously. -
validationLink
- A link to be embedded into the QR code generated for human readable representation of the invoice. -
receptionDate
- The date and time when the document was submitted to IRBM.
Authorized by the Tax Authority 207 AP PDF created successfully 209 AP Workflow successfully completed 400 RE Rejected by the Tax Authority or the counterparty 400 (401) RE Rejected by the Tax Authority or the counterparty -
To configure notifications for your company, or update your current configuration, contact our Professional Services team.
The taxpayer can use the following Indirect Tax API endpoints to retrieve application responses:
-
GET /notifications/MY
-
GET /documents/MY/{documentId}/notifications
- GET /notifications/MY
-
The supplier can send a
GET
request to the/notifications/MY
endpoint to retrieve application responses that match the set search criteria. This endpoint allows setting the following query parameters:Name Type Required Default Description taxId string No Set to include only notifications related to the specified taxId. This value relates to the CompanyCode set in the SBDH.
Note:If a request doesn't include this parameter, it will return all the notifications related to the country and the sourceSystemId parameter.
page integer No 1 Specify the page to be returned, set the value between 1 and 10. perPage integer No 10 Specify the number of results for the returned page, set its value between 1 and 100.
Important:If the attachment file is configured to return binary content, instead of a link, use only values between 1 and 10.
sourceSystemId string Yes Set to include only notifications related to documents that originate from the given source system. This value is related to the SenderSystemId in the SBDH. includeAckwnowledged boolean No false Set to "true" to specify whether previously acknowledged notifications, within 24 hours of their acknowledgment, must be included in the result. processType string No Set to "0" to only include notifications related to outbound documents. <sbd:StandardBusinessDocument xmlns="http://uri.etsi.org/01903/v1.4.1#" xmlns:cac="urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2" xmlns:cbc="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2" xmlns:sbd="http://www.unece.org/cefact/namespaces/StandardBusinessDocumentHeader" xmlns:xades="http://uri.etsi.org/01903/v1.3.2#" xmlns:ad="http://www.sovos.com/namespaces/additionalData" xmlns:sci="http://www.sovos.com/namespaces/sovosCanonicalInvoice" xmlns:svs="http://www.sovos.com/namespaces/sovosDocument" xmlns:sov="http://www.sovos.com/namespaces/sovosExtensions" xmlns:ds="http://www.w3.org/2000/09/xmldsig#" xmlns:ext="urn:oasis:names:specification:ubl:schema:xsd:CommonExtensionComponents-2" xmlns:inv="urn:oasis:names:specification:ubl:schema:xsd:Invoice-2"> <sbd:StandardBusinessDocumentHeader> <sbd:HeaderVersion>1.0</sbd:HeaderVersion> <sbd:Sender> <sbd:Identifier Authority="MY">123456789</sbd:Identifier> <sbd:ContactInformation> <sbd:Contact>123456789</sbd:Contact> <sbd:EmailAddress/> <sbd:FaxNumber/> <sbd:TelephoneNumber/> <sbd:ContactTypeIdentifier/> </sbd:ContactInformation> </sbd:Sender> <sbd:Receiver> <sbd:Identifier Authority="MY"/> <sbd:ContactInformation> <sbd:Contact/> <sbd:EmailAddress/> <sbd:FaxNumber/> <sbd:TelephoneNumber/> <sbd:ContactTypeIdentifier/> </sbd:ContactInformation> </sbd:Receiver> <sbd:DocumentIdentification> <sbd:Standard>urn:oasis:names:specification:ubl:schema:xsd:Invoice-2</sbd:Standard> <sbd:TypeVersion>2.1</sbd:TypeVersion> <sbd:InstanceIdentifier/> <sbd:Type>Invoice</sbd:Type> <sbd:MultipleType>false</sbd:MultipleType> <sbd:CreationDateAndTime>2020-06-16T00:31:52Z</sbd:CreationDateAndTime> </sbd:DocumentIdentification> <sbd:BusinessScope> <sbd:Scope> <sbd:Type>Version</sbd:Type> <sbd:InstanceIdentifier/> <sbd:Identifier>1.0</sbd:Identifier> </sbd:Scope> <sbd:Scope> <sbd:Type>SenderDocumentId</sbd:Type> <sbd:InstanceIdentifier/> <sbd:Identifier>321412</sbd:Identifier> </sbd:Scope> <sbd:Scope> <sbd:Type>SenderSystemId</sbd:Type> <sbd:InstanceIdentifier/> <sbd:Identifier>UAT101</sbd:Identifier> </sbd:Scope> <sbd:Scope> <sbd:Type>CompanyCode</sbd:Type> <sbd:InstanceIdentifier/> <sbd:Identifier>123456789</sbd:Identifier> </sbd:Scope> <sbd:Scope> <sbd:Type>Country</sbd:Type> <sbd:InstanceIdentifier/> <sbd:Identifier>MY</sbd:Identifier> </sbd:Scope> <sbd:Scope> <sbd:Type>ProcessType</sbd:Type> <sbd:InstanceIdentifier/> <sbd:Identifier>Outbound</sbd:Identifier> </sbd:Scope> <sbd:Scope> <sbd:Type>Mapping.TransformDocument</sbd:Type> <sbd:InstanceIdentifier/> <sbd:Identifier>SCI-TO-LEGAL_INVOICE</sbd:Identifier> </sbd:Scope> <sbd:Scope> <sbd:Type>Mapping.OutputSchema</sbd:Type> <sbd:InstanceIdentifier/> <sbd:Identifier>UBLInvoice</sbd:Identifier> </sbd:Scope> <sbd:Scope> <sbd:Type>SubSchema</sbd:Type> <sbd:InstanceIdentifier/> <sbd:Identifier/> </sbd:Scope> <sbd:Scope> <sbd:Type>BusinessCategory</sbd:Type> <sbd:InstanceIdentifier/> <sbd:Identifier>B2B</sbd:Identifier> </sbd:Scope> <sbd:Scope> <sbd:Type>Transmission.OperationType</sbd:Type> <sbd:InstanceIdentifier/> <sbd:Identifier>SIGNING</sbd:Identifier> </sbd:Scope> <sbd:Scope> <sbd:Type>BusinessProcess</sbd:Type> <sbd:InstanceIdentifier/> <sbd:BusinessService> <sbd:BusinessServiceName>Default</sbd:BusinessServiceName> </sbd:BusinessService> </sbd:Scope> </sbd:BusinessScope> </sbd:StandardBusinessDocumentHeader> <svs:SovosDocument> <sci:SovosCanonicalInvoice> <inv:Invoice> *UBL Elements* </inv:Invoice> </sci:SovosCanonicalInvoice>a </svs:SovosDocument> </sbd:StandardBusinessDocument>
- Request Sample
-
curl --location --request GET 'https://api-test.sovos.com/v1/notifications/MY?page=1&perPage=2&taxId={taxId}&sourceSystemId={sourceSystemId}&processType=0' \ --header 'Content-Type: application/json' \ --header 'x-correlationId: SET-TO-UNIQUE-VALUE' \ --header 'Authorization: Bearer TOKEN'
- Response Sample
-
{ "timestamp": 1633685509314, "status": 200, "success": true, "message": "Notifications Listed", "data": { "pageState": { "page": 1, "perPage": 50, "totalEntries": 1 }, "notifications": [ { "createdDate": 1633681296, "metadata": { "productId": "my_UBLInvoice__1.0", "documentId": "DOCUMENT-ID", "erpDocumentId": "321412", "erpSystemId": "UAT101", "processType": "0", "taxId": "YOUR-TAXID", "sciCloudStatusCode": "200", "sciResponseCode": "AP", "sciStatusAction": "NOA", "sciGovtStatusCode": "100" }, "appPrefix": "DLT", "notificationId": "a8dc1aa2-fbe6-45ce-9e4c-97a3d5fdb91c", "content": "PEF...NlPg==" } ] } }
- GET /documents/MY/{documentId}/notifications
- The supplier can send a
GET
request to the/documents/MY/{documentId}/notifications
endpoint to retrieve application responses related to a single document.To make this request, set the following parameter:
Name Type Required Parameter type Description documentId string Yes Path Set to the ID of the document returned in step 2 - Request Sample
-
curl --location --request GET 'https://api-test.sovos.com/v1/documents/MY/{documentId}/notifications?' \ --header 'Content-Type: application/json' \ --header 'Authorization: Bearer TOKEN' \ --header 'x-correlationId: SET-TO-UNIQUE-VALUE'
- Response Sample
-
{ "timestamp": 1633685509314, "status": 200, "success": true, "message": "Notifications Listed", "data": { "pageState": { "page": 1, "perPage": 50, "totalEntries": 1 }, "notifications": [ { "createdDate": 1633681296, "metadata": { "productId": "my_UBLInvoice__1.0", "documentId": "DOCUMENT-ID", "erpDocumentId": "321412", "erpSystemId": "UAT101", "processType": "0", "taxId": "YOUR-TAXID", "sciCloudStatusCode": "200", "sciResponseCode": "AP", "sciStatusAction": "NOA", "sciGovtStatusCode": "100" }, "appPrefix": "DLT", "notificationId": "a8dc1aa2-fbe6-45ce-9e4c-97a3d5fdb91c", "content": "PEF...NlPg==" } ] } }
Step 11: Supplier Marks the Application Responses as Acknowledged
After retrieving application responses, the supplier must process them and mark them as acknowledged. This can be done by sending a PUT
request to the /notifications/MY
endpoint.
To make this request, set the following request body parameters:
Name | Type | Required | Description |
---|---|---|---|
status | string | Yes | Set to read. |
notificationId | string | Yes | Set to the ID of the notification that must be marked as acknowledged. |
Multiple notificationId values can be acknowledged using one Indirect Tax API call by including them in a single request.
- Request Sample
-
curl --location --request PUT 'https://api-test.sovos.com/v1/notifications/MY' \ --header 'Content-Type: application/json' \ --header 'Authorization: Bearer TOKEN' \ --header 'x-correlationId: SET-TO-UNIQUE-VALUE' \ --data-raw '[ { "status": "read", "notificationId": "51341d39-fd3e-4dcf-aea3-a73d73e0de76" } ]'
- Response Sample
-
{ "timestamp": 1601673284, "status": 200, "success": true, "message": "Notifications acknowledged successfully." }
PDF Generation
Sovos generates a PDF that contains the content of the invoice XML in a human-readable format along with the QR code. The QR code itself contains a public link to the invoice on the IRBM portal.
Archiving
Archiving can be done as a bundle, for example, as part of the Clearance flow, and is recommended for suppliers integrating with the Sovos solution for Malaysia for the first time. It can also be done separately, using an explicit API call that uses another archive. For more information on standalone archiving, see the eArchiving documentation page.
Bundled e-invoice archiving on the new platform is optional. Existing customers can choose to use their current solution and include e-Archiving.
Distribution
The invoice can be communicated to the Counterparty by Sovos or the taxpayer.
- Sovos shares the invoice with the Counterparty
-
For Sovos to be able to distribute the invoice to the Counterparty, the Taxpayer needs an email distribution channel. For more information contact Sovos Professional Services.
After a distribution channel is configured, the Taxpayer should no longer send the invoice to the Counterparty.
- Taxpayer shares the invoice with their Counterparty
-
In cases where a distribution channel has not been configured, the Taxpayer is responsible for distributing the invoice to the Counterparty.
The invoice can be communicated to the Counterparty with the QR code included if the human readable version is shared. The invoice data is made available in IRBM's system and can be consulted by the Counterparty using the QR code.
When communicating the invoice, it's important to ensure the invoice's authenticity and integrity. See our Post-audit Signing and Validation service for more information on how to sign electronic documents in Malaysia.
Error Handling
Customers need to adhere to the error handling principles outlined on the responses page.
In general, all error codes in the 400 range are client errors, so the customer needs to analyze them. After fixing the error, it's possible to resend the request. Error codes 408 and 429 are exceptions: in these cases, customers should wait at least 60 seconds before retrying. Error codes in the 500 range indicate server errors. See the HTTP status codes page for more information. When these errors occur, customers should resend the request following the guidance provided on the responses page, which also lists all error codes that the Indirect Tax API may return. This government web page contains documentation about the API that includes all the error codes and messages that can be returned, and can be used for error handling.
Retrieve invoice
The diagram below provides an overview of the inbound flow process for Invoice Retrieval in Malaysia:
Step 1: Sovos Retrieves the Documents from the MY IRBM System
Sovos uses the buyer's credentials to authenticate with the MY IRBM system to collect the documents that have been made available (either in JSON or XML formats).
Step 2: Sovos Generates the PDF
Sovos generates a PDF from each document from IRBM and generates a notification. That includes the content of the QR code and the validation link for this document.
Step 3: Sovos Maps the Retrieved Document into SCI and Makes them Available
Sovos stores the retrieved documents, maps them to SCI, and makes them available for buyers to get. The PDF version of the documents is also made available.
Step 4: Sovos Distributes the PDF
Sovos can distribute the PDF via email to a configurable email address.
Step 5: Buyer Retrieves the Available Documents
It is highly recommended that clients configure their Application Response attachments as download links instead of base64 encoded data to avoid potential size limitations when retrieving responses. The default option is "download links".
When using "download links" option, the response contains a URL from where the file can be downloaded.
When using "binary data" option, the file itself is embedded in the response encoded in base64.
This configuration is available through our Professional Services team.
The buyer can use the following Indirect Tax API endpoint to retrieve application responses:
GET /notifications/MY
To complete a transaction, the buyer must retrieve the application responses until the transaction has finished. If the buyer has subscribed to all notifications, the transaction can generate different application responses, as shown in the table below:
SCICloudStatusCode | SCIResponseCode | Sample |
---|---|---|
100 | IP | Document received successfully |
101 | IP | Document mapped successfully |
207 | AP | PDF created successfully The PDF is part of the attachments in the notification (see the attached document) |
209 | AP | Workflow successfully completed |
- GET /notifications/MY
- The buyer can send a GET request to the /notifications/MY endpoint to retrieve application responses that match the set search criteria. This endpoint allows setting the following query parameters:
Name Type Required Default Description taxId string No Set to include only notifications related to the specified taxId.
page integer No 1 To specify the page to be returned, set the value between 1 and 10. perPage integer No 10 To specify the number of results for the returned page, set its value between 1 and 100.
Important:If the attachment file is configured to return the binary content, instead of a link. Only use values between 1 and 10.
sourceSystemId string Yes Set to include only notifications related to documents that originate from the given source system. includeAckwnowledged boolean No false Set to "true" to specify whether previously acknowledged notifications must be included in the result. processType string No Set to "1" to only include notifications related to inbound documents. - Request Sample
curl --location --request GET 'https://api-test.sovos.com/v1/notifications/MY?page=1&perPage=2&taxId={taxId}&sourceSystemId={sourceSystemId}&processType=1' \ --header 'Content-Type: application/json' \ --header 'x-correlationId: SET-TO-UNIQUE-VALUE' \ --header 'Authorization: Bearer TOKEN'
- Response Sample
{ "timestamp": 1633685509314, "status": 200, "success": true, "message": "Notifications Listed", "data": { "pageState": { "page": 1, "perPage": 50, "totalEntries": 1 }, "notifications": [ { "createdDate": 1633681296, "metadata": { "productId": "my_UBLInvoice_Polling_1.0", "documentId": "DOCUMENT-ID", "erpDocumentId": "321412", "erpSystemId": "UAT101", "processType": "0", "taxId": "YOUR-TAXID", "sciCloudStatusCode": "200", "sciResponseCode": "AP", "sciStatusAction": "NOA", "sciGovtStatusCode": "100" }, "appPrefix": "DLT", "notificationId": "a8dc1aa2-fbe6-45ce-9e4c-97a3d5fdb91c", "content": "PEF...NlPg==" } ] } }
Step 6: Buyer Acknowledges the Retrieved Documents
After retrieving the documents, the buyer must process them and mark them as acknowledged. This can be done by sending a PUT
request to the /notifications/MY
endpoint.
To make this request, set the following request body parameters:
Name | Type | Required | Description |
---|---|---|---|
status | string | Yes | Set to "read". |
notificationId | string | Yes | Set to the ID of the notification that must be marked as acknowledged. |
Multiple notificationId
values can be acknowledged using one Indirect Tax API call by including them in a single request.
- Request Sample
curl --location --request PUT 'https://api-test.sovos.com/v1/notifications/MY' \ --header 'Content-Type: application/json' \ --header 'Authorization: Bearer TOKEN' \ --header 'x-correlationId: SET-TO-UNIQUE-VALUE' \ --data-raw '[ { "status": "read", "notificationId": "51341d39-fd3e-4dcf-aea3-a73d73e0de76" } ]'
- Response Sample
{ "timestamp": 1601673284, "status": 200, "success": true, "message": "Notifications acknowledged successfully." }
Reject invoice
The following figure gives a detailed overview of the process for Invoice Rejection in Malaysia based on the default business process. The text below describes the process step by step.
Step 1: Buyer sends a POST Request to Sovos
The buyer sends a POST
request to the /documents/MY/action
endpoint.
To make this request, set the following request body parameters:
Name | Type | Required | Description |
---|---|---|---|
actionCode | string | Yes | Set to document.rejection |
documents | array of objects | Yes | An array of objects to include the metadata and the inbound document ID. |
metadata | object | No | An object that includes the required metadata. |
reason | string | No | Provide the reason for rejecting the invoice. The max length is 300 characters. |
documentId | string | Yes | The ID of the document to be rejected. This is the documentId that Sovos returns when receiving the document. |
You can reject more than one document at the same time.
- Request Sample
curl --location 'https://api-test.sovos.com/v1/documents/MY/action' \ --header 'x-correlationId: SET-TO-UNIQUE-VALUE' \ --header 'Content-Type: application/json' \ --header 'Authorization: Bearer TOKEN' \ --data '{ "actionCode": "document.reject", "documents": [ { "metadata": { "reason": "reject action test" }, "documentId": "70acd7b6595bd6c27c7f760d594c89a0" } ] }
- Response Sample
{ "status": 202, "message": "Accepted", "success": true, "timestamp": 1724404345626 "data":[ { "status": 202, "transactionId": "564c4995-ecc9-4ba0-a578-4a3976feb6ea", "documentId": "70acd7b6595bd6c27c7f760d594c89a0" } ] }
Step 2: Sovos transmits Request to IRBM
Sovos finds the corresponding document in the system and transmits the rejection request to IRBM.
Step 3: IRBM processes the Request
IRBM verifies that the 72-hour window has not passed since the original document was issued, and that the document can be rejected successfully.
Step 4: IRBM returns the Response
IRBM returns the success message, or the error message if the rejection could not be performed.
Step 5: Buyer retrieves the Application Responses
It is highly recommended that clients configure their Application Response attachments as download links instead of base64 encoded data to avoid potential size limitations when retrieving responses. The default option is "download links".
When using "download links" option, the response contains a URL from where the file can be downloaded.
When using "binary data" option, the file itself is embedded in the response encoded in base64.
This configuration is available through our Professional Services team.
As a response to the initial sending of the document, the client will receive a JSON response message with an HTTP status code of 202 (asynchronous transaction). This means that the supplier must retrieve the application responses that become available during the transaction, which provide status information.
Clients have the option to retrieve application responses (notifications) in one of two ways:
- Fetch everything in one single response (notification)
- This means, when polling for responses, Sovos will only return one final notification with
SCICloudStatusCode 209
that contains all the relevant attachments/data. Detailed description follows. - Fetch multiple responses (notifications) containing different information
- In this case, when polling for responses, Sovos will return multiple notifications with different
SCICloudStatusCode
values containing different attachments/data until the final one (with status 209) is returned. Detailed description follows.
- Single response
To complete a transaction, the buyer retrieves only one notification, the complete workflow one, with
SCICloudStatusCode
of 209 and all the necessary attachments/data. Afterwards, the notification needs to be parsed forSCIResponseCode
value. Possible values forSCIResponseCode
:"AP", meaning the document's compliance status has been accepted with all the necessary attachments/data present.
"RE", meaning the document's compliance status has been rejected, and more parsing is needed:
if
SCIGovtStatusCode
is present, the error can be found by readingStatusReason
if
SCIInternalValidationCode
is present, the error can be found by readingStatusReason
Note:Receiving a notification containing
SCICloudStatusCode
with a value in the 5xx range still remains an option, as it indicates a server error. In this case, the workflow would not be considered complete since it would not return a notification withSCICloudStatusCode
of 209.SCICloudStatusCode SCIResponseCode Sample 209 AP Workflow successfully completed 209 RE Workflow successfully completed - Multiple responses
To complete a transaction, the buyer retrieves only one notification with
SCICloudStatusCode
of 209 and all the necessary attachments/data. The notification needs to be parsed forSCIResponseCode
value. Possible values forSCIResponseCode
:"AP", meaning the document's compliance status has been accepted with all the necessary attachments/data present.
"RE", meaning the document's compliance status has been rejected, and more parsing is needed:
if
SCIGovtStatusCode
is present, the error can be found by readingStatusReason
if
SCIInternalValidationCode
is present, the error can be found by readingStatusReason
Note:Receiving a notification containing
SCICloudStatusCode
with a value in the 5xx range, still remains an option, as it indicates a server error. In this case the workflow would not be considered complete since it would not return a notification withSCICloudStatusCode
of 209.SCICloudStatusCode SCIResponseCode Sample 101 IP Document mapped successfully 212 AP Rejection Request Accepted 209 AP Workflow successfully completed The buyer can use the following Indirect Tax API endpoints to retrieve application responses:
GET /notifications/MY
GET /documents/MY/{documentId}/notifications
- GET /notifications/MY
The buyer can send a
GET
request to the/notifications/MY
endpoint to retrieve application responses that match the set search criteria. This endpoint allows setting the following query parameters:Name Type Required Default Description taxId string No Set to include only notifications related to the specified taxId. This value relates to the CompanyCode set in the SBDH.
Note:If a request doesn't include this parameter, it will return all the notifications related to the country and the sourceSystemId parameter.
page integer No 1 To specify the page to be returned, set the value between 1 and 10. perPage integer No 10 To specify the number of results for the returned page, set the value between 1 and 100. Important:If the attachment file is configured to return the binary content, instead of a link, only use values between 1 and 10.
sourceSystemId string Yes Set to include only notifications related to documents that originate from the given source system. This value is related to the SenderSystemId
in the SBDH.includeAcknowledged boolean No false Set to "true" to specify whether previously acknowledged notifications must be included in the result. processType string No Set to "0" to only include notifications related to outbound documents. - Request Sample
curl --location 'https://api-test.sovos.com/v1/documents/MY/DOCUMENT-ID/notifications?includeAcknowledged=false' \ --header 'Content-Type: application/json' \ --header 'x-correlationId: SET-TO-UNIQUE-VALUE' \ --header 'Authorization: Bearer TOKEN' \
- Response Sample
"status": 200, "message": "Notifications Listed", "success": true, "timestamp": 1708533734893, "data": { "pageState": { "page": 1, "perPage": 20, "totalEntries": 52, "totalPages": 3 }, "notifications": [ { "notificationId": "78bd5a18-...-73bfbdb3bf21", "correlationId": "SET-TO-UNIQUE-VALUE", "appPrefix": "DLT", "metadata": { "productId": "my_UBLInvoice_Polling_1.0", "transactionId": "43...d94", "documentId": "DOCUMENT-ID", "erpDocumentId": "192714478", "erpSystemId": "ERPSystem", "processType": "1", "taxId": "C873686030", "sciCloudStatusCode": "209", "sciResponseCode": "AP", "sciStatusAction": "NOA", "sciGovtStatusCode": "Success" }, "content": "PD...2U+", "createdDate": 1708533707255
- GET /documents/MY/{documentId}/notifications
The buyer can send a
GET
request to the/documents/MY/{documentId}/notifications
endpoint to retrieve application responses related to a single document.To make this request, set the following parameters:
Name Type Required Parameter type Default Description documentId string Yes Path Set it to the ID of the document returned in step 1. includeAcknowledged boolean No Query false Set it to "true" to specify whether previously acknowledged notifications must be included in the result. - Request Sample
curl --location 'https://api-test.sovos.com/v1/documents/MY/DOCUMENT-ID/notifications?includeAcknowledged=false' \ --header 'Content-Type: application/json' \ --header 'x-correlationId: SET-TO-UNIQUE-VALUE' \ --header 'Authorization: Bearer TOKEN'
- Response Sample
"status": 200, "message": "Notifications Listed", "success": true, "timestamp": 1708533734893, "data": { "pageState": { "page": 1, "perPage": 20, "totalEntries": 52, "totalPages": 3 }, "notifications": [ { "notificationId": "78bd5a18-...-73bfbdb3bf21", "correlationId": "SET-TO-UNIQUE-VALUE", "appPrefix": "DLT", "metadata": { "productId": "my_UBLInvoice_Polling_1.0", "transactionId": "43...d94", "documentId": "DOCUMENT-ID", "erpDocumentId": "192714478", "erpSystemId": "ERPSystem", "processType": "1", "taxId": "C873686030", "sciCloudStatusCode": "209", "sciResponseCode": "AP", "sciStatusAction": "NOA", "sciGovtStatusCode": "Success" }, "content": "PD...2U+", "createdDate": 1708533707255
Step 6: Buyer marks the Application Responses as Acknowledged
After retrieving application responses, the buyer must process them and mark them as acknowledged. This can be done by sending a PUT
request to the /notifications/MY
endpoint.
To make this request, set the following request body parameters:
Name | Type | Required | Description |
---|---|---|---|
status | string | Yes | Set to "read". |
notificationId | string | Yes | Set to the ID of the notification that must be marked as acknowledged. |
Multiple notificationId values can be acknowledged using one Indirect Tax API call by including them in a single request.
- Request Sample
curl --location --request PUT 'https://api-test.sovos.com/v1/notifications/MY' \ --header 'Content-Type: application/json' \ --header 'x-correlationId: SET-TO-UNIQUE-VALUE' \ --header 'Authorization: Bearer TOKEN' \ --data '[ { "status": "read", "notificationId": "e7b32eda-cb67-43b9-91de-f6d9c90f60d9" } ]'
- Response Sample
{ "status": 200, "message": "OK", "success": true, "timestamp": 1708509282198, "data": {} }
Error Handling
Customers need to adhere to the error handling principles outlined on the responses page.
In general, all error codes in the 400 range are client errors, so the customer needs to analyze them. After fixing the error, it's possible to resend the request. Error codes 408 and 429 are exceptions: in these cases, customers should wait at least 60 seconds before retrying. Error codes in the 500 range indicate server errors. When these occur, customers should resend the request following the guidance provided on the responses page, which also lists all error codes that the Indirect Tax API may return. This government web page contains documentation about the API that includes all the error codes and messages that can be returned, and can be used for error handling.
Errors coming from the IRBM system will be shown in the application response. This means that, in the case of a rejection, the SCIResponseCode will be set to "RE" and any error codes coming from the system will be shown in the SCIGovtStatusCode
element. The customer is responsible for taking action upon receiving an error code and a message from the IRBM system.
Cancel invoice
The following figure gives a detailed overview of the process for Invoice Cancellation in Malaysia based on the Default business process. The text below describes the process step by step.
Step 1: Supplier sends a POST Request to Sovos
The buyer sends a POST
request to the /documents/MY/action
endpoint.
To make this request, set the following request body parameters:
Name | Type | Required | Description |
---|---|---|---|
actionCode | string | Yes | Set to document.cancellation |
documents | array of objects | Yes | An array of objects to include the metadata and the inbound document ID. |
metadata | object | No | An object that includes the required metadata. |
reason | string | No | This field can be used to provide the reason for canceling the invoice. The max length is 300 characters. |
documentId | string | Yes | The ID of the document to be cancelled. This is the documentId that Sovos returns when sending the document. |
- Request Sample
curl --location 'https://api-test.sovos.com/v1/documents/MY/action' \ --header 'x-correlationId: SET-TO-UNIQUE-VALUE' \ --header 'Content-Type: application/json' \ --header 'Authorization: Bearer TOKEN' \ --data '{ "actionCode": "document.cancellation", "documents": [ { "metadata": { "reason": "Wrong total submitted" }, "documentId": "DOCUMENT-ID" } ] }'
- Response Sample
{ "status": 202, "message": "Accepted", "success": true, "timestamp": 1708018192828, "data": [ { "status": 202, "documentId": "DOCUMENT-ID" } ] }
Step 2: Sovos transmits Request (to IRBM)
Sovos finds the corresponding document in the system and transmits the cancellation request to IRBM.
Step 3: IRBM processes the Request
IRBM verifies that the 72-hour window has not passed since the original document was issued, and that the document can be cancelled successfully. If the 72-hour window has passed, the taxpayer can still cancel the document by issuing a credit note, debit note, or refund note separately.
Step 4: IRBM returns the Response
IRBM returns the success message, or the error message if the cancellation could not be performed.
Step 5: Taxpayer retrieves the Application Responses
It is highly recommended that clients configure their Application Response attachments as download links instead of base64 encoded data to avoid potential size limitations when retrieving responses. The default option is "download links".
When using "download links" option, the response contains a URL from where the file can be downloaded.
When using "binary data" option, the file itself is embedded in the response encoded in base64.
This configuration is available through our Professional Services team.
As a response to the initial sending of the document, the client will receive a JSON response message with an HTTP status code of 202 (asynchronous transaction). This means that the taxpayer must retrieve the application responses that become available during the transaction, which provide status information.
Clients have the option to retrieve application responses (notifications) in one of two ways:
- Fetch everything in one single response (notification)
- This means, when polling for responses, Sovos will only return one final notification with
SCICloudStatusCode 209
that contains all the relevant attachments/data. Detailed description follows. - Fetch multiple responses (notifications) containing different information
- In this case, when polling for responses, Sovos will return multiple notifications with different
SCICloudStatusCode
values containing different attachments/data until the final one (with status 209) is returned. Detailed description follows.
- Single response
To complete a transaction, the buyer retrieves only one notification, the complete workflow one, with
SCICloudStatusCode
of 209 and all the necessary attachments/data. Afterwards, the notification needs to be parsed forSCIResponseCode
value. Possible values forSCIResponseCode
:"AP", meaning the document's compliance status has been accepted with all the necessary attachments/data present.
"RE", meaning the document's compliance status has been rejected, and more parsing is needed:
if
SCIGovtStatusCode
is present, the error can be found by readingStatusReason
if
SCIInternalValidationCode
is present, the error can be found by readingStatusReason
Note:Receiving a notification containing
SCICloudStatusCode
with a value in the 5xx range still remains an option, as it indicates a server error. In this case, the workflow would not be considered complete since it would not return a notification withSCICloudStatusCode
of 209.SCICloudStatusCode SCIResponseCode Sample 209 AP Workflow successfully completed 209 RE Workflow successfully completed - Multiple responses
To complete a transaction, the buyer retrieves only one notification with
SCICloudStatusCode
of 209 and all the necessary attachments/data. Afterwards, the notification needs to be parsed forSCIResponseCode
value. Possible values forSCIResponseCode
:"AP", meaning the document's compliance status has been accepted with all the necessary attachments/data present.
"RE", meaning the document's compliance status has been rejected, and more parsing is needed:
if
SCIGovtStatusCode
is present, the error can be found by readingStatusReason
if
SCIInternalValidationCode
is present, the error can be found by readingStatusReason
Note:Receiving a notification containing
SCICloudStatusCode
with a value in the 5xx range still remains an option, as it indicates a server error. In this case the workflow would not be considered complete since it would not return a notification withSCICloudStatusCode
of 209.SCICloudStatusCode SCIResponseCode Sample 101 IP Document mapped successfully 201 AP Cancelled 209 AP Workflow successfully completed The buyer can use the following Indirect Tax API endpoints to retrieve application responses:
GET /notifications/MY
GET /documents/MY/{documentId}/notifications
- GET /notifications/MY
The buyer can send a
GET
request to the/notifications/MY
endpoint to retrieve application responses that match the set search criteria. This endpoint allows setting the following query parameters:Name Type Required Default Description taxId string No Set to include only notifications related to the specified taxId. This value relates to the CompanyCode set in the SBDH.
Note:If a request doesn't include this parameter, it will return all the notifications related to the country and the sourceSystemId parameter.
page integer No 1 To specify the page to be returned, set the value between 1 and 10. perPage integer No 10 To specify the number of results for the returned page, set the value between 1 and 100. Important:If the attachment file is configured to return the binary content, instead of a link, only use values between 1 and 10.
sourceSystemId string Yes Set to include only notifications related to documents that originate from the given source system. This value is related to the SenderSystemId
in the SBDH.includeAcknowledged boolean No false Set to "true" to specify whether previously acknowledged notifications must be included in the result. processType string No Set to "0" to only include notifications related to outbound documents. - Request Sample
curl --location 'https://api-test.sovos.com/v1/documents/MY/DOCUMENT-ID/notifications?includeAcknowledged=false' \ --header 'Content-Type: application/json' \ --header 'x-correlationId: SET-TO-UNIQUE-VALUE' \ --header 'Authorization: Bearer TOKEN' \
- Response Sample
"status": 200, "message": "Notifications Listed", "success": true, "timestamp": 1708533734893, "data": { "pageState": { "page": 1, "perPage": 20, "totalEntries": 52, "totalPages": 3 }, "notifications": [ { "notificationId": "40e2ef57-...-8e1c9e8de016", "correlationId": "SET-TO-UNIQUE-VALUE", "appPrefix": "DLT", "metadata": { "productId": "my_UBLInvoice__1.0", "transactionId": "78...5f0", "documentId": "DOCUMENT-ID", "erpDocumentId": "172012265", "erpSystemId": "ERPSystem", "processType": "0", "taxId": "11161161", "sciCloudStatusCode": "209", "sciResponseCode": "AP", "sciStatusAction": "NOA", "sciGovtStatusCode": "Success" }, "content": "PD...2U+", "createdDate": 1708533707255
- GET /documents/MY/{documentId}/notifications
The buyer can send a
GET
request to the/documents/MY/{documentId}/notifications
endpoint to retrieve application responses related to a single document.To make this request, set the following parameters:
Name Type Required Parameter type Default Description documentId string Yes Path Set to the ID of the document returned in step 1. includeAcknowledged boolean No Query false Set to "true" to specify whether previously acknowledged notifications must be included in the result. - Request Sample
curl --location 'https://api-test.sovos.com/v1/documents/MY/DOCUMENT-ID/notifications?includeAcknowledged=false' \ --header 'Content-Type: application/json' \ --header 'x-correlationId: SET-TO-UNIQUE-VALUE' \ --header 'Authorization: Bearer TOKEN'
- Response Sample
"status": 200, "message": "Notifications Listed", "success": true, "timestamp": 1708533734893, "data": { "pageState": { "page": 1, "perPage": 20, "totalEntries": 52, "totalPages": 3 }, "notifications": [ { "notificationId": "40e2ef57-...-8e1c9e8de016", "correlationId": "SET-TO-UNIQUE-VALUE", "appPrefix": "DLT", "metadata": { "productId": "my_UBLInvoice__1.0", "transactionId": "78...5f0", "documentId": "DOCUMENT-ID", "erpDocumentId": "172012265", "erpSystemId": "ERPSystem", "processType": "0", "taxId": "11161161", "sciCloudStatusCode": "209", "sciResponseCode": "AP", "sciStatusAction": "NOA", "sciGovtStatusCode": "Success" }, "content": "PD...2U+", "createdDate": 1708533707255
Step 6: Taxpayer marks the Application Responses as Acknowledged
After retrieving application responses, the supplier must process them and mark them as acknowledged. This can be done by sending a PUT
request to the /notifications/MY
endpoint.
To make this request, set the following request body parameters:
Name | Type | Required | Description |
---|---|---|---|
status | string | Yes | Set to "read". |
notificationId | string | Yes | Set to the ID of the notification that must be marked as acknowledged. |
Multiple notificationId values can be acknowledged using one Indirect Tax API call by including them in a single request.
- Request Sample
curl --location --request PUT 'https://api-test.sovos.com/v1/notifications/MY' \ --header 'Content-Type: application/json' \ --header 'x-correlationId: SET-TO-UNIQUE-VALUE' \ --header 'Authorization: Bearer TOKEN' \ --data '[ { "status": "read", "notificationId": "e7b32eda-cb67-43b9-91de-f6d9c90f60d9" } ]'
- Response Sample
{ "status": 200, "message": "OK", "success": true, "timestamp": 1708509282198, "data": {} }
Error Handling
Customers need to adhere to the error handling principles outlined on the responses page.
In general, all error codes in the 400 range are client errors, so the customer needs to analyze them. After fixing the error, it's possible to resend the request. Error codes 408 and 429 are exceptions: in these cases, customers should wait at least 60 seconds before retrying. Error codes in the 500 range indicate server errors. When these occur, customers should resend the request following the guidance provided on the responses page, which also lists all error codes that the Indirect Tax API may return. This government web page contains documentation about the API that includes all the error codes and messages that can be returned, and can be used for error handling.
Errors coming from the IRBM system will be shown in the application response. This means that, in the case of a rejection, the SCIResponseCode will be set to "RE" and any error codes coming from the system will be shown in the SCIGovtStatusCode
element. The customer is responsible for taking action upon receiving an error code and a message from the IRBM system.
Document details consultation
The following diagram gives a detailed overview of the process for Document Details Consultation in Malaysia based on the default business process:
Step 1: Buyer Sends a Consultation Request for a Specific UUID to Sovos
The customer sends a POST
request to the /v1/documents/MY/consultation
.
Request body parameters:
Name | Type | Description |
---|---|---|
consultationCode | String, required | Set to "document.retrieval" to make a validation on the IRBM. |
productId | String, required | Set to "my_UBLInvoice__1.0". |
country | String | Set to "MY". |
company | String | |
taxId | String | Set to the company tax ID. |
documents | Array of objects | |
metadata | String | |
uuid | String | Set to the UUID of the document. |
- Request Sample
curl --location --request POST 'https://api-test-tls.sovos.com/v1/consultations' \ --header 'x-correlationId: SET-TO-UNIQUE-VALUE' \ --header 'Authorization: Bearer TOKEN' \ --header 'Content-Type: application/json' \ --data-raw '{ "consultationCode": "document.retrieval", "productId": "MY_UBLInvoice__1.0", "country": "MY", "company": { "taxId": "<company tax id>" }, "documents": [ { "metadata": { "uuid": <UUID of the document> } } ] }
- Response Sample
{ "message": "OK", "status": 200, "success": true, "data": { "completed": true, "detailsDto": { "completed": "Success", "messages": [], "documents": [ { "key": "M32Z3ZDRJVK2W0535KXFK2DJ10_DocumentDetails.json", "data": "eyJ1dWlkIjoiTTMyWjNaRFJKVksyVzA1MzVLWEZLMkRKMTAiLCJzdWJtaXNzaW9uVWlkIjoiNDE2SEZLWDZXUThGRDBZMzVLWEZLMkRKMTAiLCJsb25nSWQiOiJONDZFNjM3ME5RWDJEQ1pFNUtYRksyREoxMFEwcnhhbjE3MzIwMzMxMTUiLCJkYXRlVGltZVJlY2VpdmVkIjoiMjAyNC0xMS0xOVQxNjoxODozNVoiLCJkYXRlVGltZVZhbGlkYXRlZCI6IjIwMjQtMTEtMTlUMTY6MTg6MzZaIiwic3RhdHVzIjoiVmFsaWQiLCJjcmVhdGVkQnlVc2VySWQiOiJDODczNjg2MDMwOmZkNTlmY2NkLTk1OTctNDY0OS1iNmNiLWI4MTc4OGJmNzgyOCIsImRvY3VtZW50U3RhdHVzUmVhc29uIjpudWxsLCJjYW5jZWxEYXRlVGltZSI6bnVsbCwicmVqZWN0UmVxdWVzdERhdGVUaW1lIjpudWxsLCJ2YWxpZGF0aW9uUmVzdWx0cyI6eyJTdGF0dXMiOiJWYWxpZCIsIlZhbGlkYXRpb25TdGVwcyI6W3siU3RhdHVzIjoiVmFsaWQiLCJFcnJvciI6bnVsbCwiTmFtZSI6IlN0ZXAwMy1EdXBsaWNhdGVkIFN1Ym1pc3Npb24gVmFsaWRhdG9yIn0seyJTdGF0dXMiOiJWYWxpZCIsIkVycm9yIjpudWxsLCJOYW1lIjoiU3RlcDA0LUNvZGUgRmllbGQgVmFsaWRhdG9yIn0seyJTdGF0dXMiOiJWYWxpZCIsIkVycm9yIjpudWxsLCJOYW1lIjoiU3RlcDA1LVRheHBheWVyIFByb2ZpbGUgVmFsaWRhdG9yIn0seyJTdGF0dXMiOiJWYWxpZCIsIkVycm9yIjpudWxsLCJOYW1lIjoiU3RlcDA2LURvY3VtZW50IFJlZmVyZW5jZXMgVmFsaWRhdG9yIn0seyJTdGF0dXMiOiJWYWxpZCIsIkVycm9yIjpudWxsLCJOYW1lIjoiU3RlcDA3LURvY3VtZW50IEN1cnJlbmN5IFZhbGlkYXRvciJ9XX0sImludGVybmFsSWQiOiIwMS1CdXllci1yZWplY3Rpb24iLCJkYXRlVGltZUlzc3VlZCI6IjIwMjQtMTEtMTdUMDA6MDA6MDBaIiwidHlwZU5hbWUiOiJJbnZvaWNlIiwidHlwZVZlcnNpb25OYW1lIjoiVmVyc2lvbiAxIiwiaXNzdWVyVGluIjoiQzg3MzY4NjAzMCIsImlzc3Vlck5hbWUiOiJBTVMgU2V0aWEgSmF5YSBTZG4uIEJoZC4iLCJyZWNlaXZlcklkIjoiQzg3MzY4NjAzMCIsInJlY2VpdmVyTmFtZSI6IkhlYmF0IEdyb3VwIiwidG90YWxFeGNsdWRpbmdUYXgiOiIxNDM2LjUiLCJ0b3RhbERpc2NvdW50IjoiMTQzNi41IiwidG90YWxOZXRBbW91bnQiOiIxNDM2LjUiLCJ0b3RhbFBheWFibGVBbW91bnQiOiIxNDM2LjUifQ==", "mimeType": "application/json" } ] } } }
- Response Sample with an Error
{ "timestamp": 1732034087, "message": "TaxAuthorityRejectedError", "status": 200, "success": false, "errors": [ { "subCode": "404", "message": "It seems that you are not authorized to get document details" } ] }
Step 2: Sovos Validates the Request and Calls IRBM
Upon receipt of the request, Sovos validates the request and calls IRBM to retrieve the details for the given UUID.
Step 3: IRBM Returns the Document Details
IRBM returns all the details for the given UUID.
Step 4: Sovos Returns the Document Details
After receiving the details for the given UUID from IRBM, the Sovos Platform builds the consultation response that is returned to the user. This response contains a JSON object representing the details of the document, encoded in base64.
Error Handling
In the event of an error, the response will return a generic 200 status notifying the user that the call was successful, but the content of the response will contain the "errors" object instead.
Mock tax authority integration
Customers can test the integration with the Sovos solution using a mocked Tax Authority communication.
It's possible to use a mock service created by Sovos, which replaces the Tax Authority communication in the solution and allows limited testing of business scenarios.
Customers can dynamically distinguish between mock services and testing against the real Tax Authority UAT environment on a document-by-document basis.
Testing with Sovos' mocked service is not a replacement for UAT/Sandbox environment testing, so UAT/Sandbox environment testing should still be performed before moving to the Production environment. This is because Sovos' mocked service cannot fully simulate the Tax Authority behavior and validations due to the vast amount of different business scenarios that are applicable for Malaysia.
Outbound Mock
The Outbound Mock simulates sending documents to the Tax Authority. To use the mock service, customers must upload specific credentials using the Configurations v2 resource. Afterward, they can proceed to issue documents.
- How to Configure the Outbound Mock
- To use the mock service for Malaysia Outbound, configure any arbitrary credentials (inside the value object) via the Settings endpoint from Configurations v2.
Here is a sample request:
curl --location --request POST 'https://api-test.sovos.com/v2/configurations/organizations/YOUR-ORG-ID/settings' \ --header 'x-correlationId: developer-guide' \ --header 'Content-Type: application/json' \ --data-raw '[ { "context": "transmission", "configurations": [ { "name": "partner_credentials_irbm", "value": { "client_id": "INSERT-ARBITRARY-CLIENTID-HERE", "client_secret": "INSERT-ARBITRARY-SECRET-HERE" }, "scope": { "category": "MY_INV", "productId": "my_UBLInvoice__1.0", "orgId": "YOUR-ORG-ID", "taxId": "YOUR-COMPANY-TAXID" } } ] } ]'
- How to Use the Outbound Mock
- When sending a document with a
POST
request to the Send a new Document endpoint to reach the mocked services, thex-correlationId
value must end with "-mock". For example,x-correlationId = "123-mock"
. Sovos' solution distinguishes between the mocked Outbound service and the real Tax Authority UAT environment based on the presence of this value.When using the
GET
method with the Notifications endpoints, thex-correlationId
doesn't need to end with "-mock". This is because the Sovos solution does not differentiate between mocked notifications and notifications related to the real Tax Authority UAT environment — they are both treated as "notifications", which can be retrieved normally. The same reasoning applies to using thePUT
method with the Mark Notifications as acknowledged endpoint: there's no need to add an x-correlationId ending with "-mock".To test Outbound against the real Tax Authority UAT environment, it is crucial to follow the correct prerequisites and configuration steps. This involves obtaining the real Tax Authority credentials and configuring them in the Sovos solution. So, when issuing the document, ensure that the x-correlationId doesn't end with "-mock".
- Outbound Mock Validation
- The main purpose of the mocked service is to allow customers in the early stages of integration to test the end-to-end flow without being blocked by the lack of real Tax Authority credentials. Only a limited set of scenarios can be tested based on the document's content, as explained in the list below:
If one or more required fields in the document are missing or empty.
Submit exactly same document (same hash) within 10 minutes.
Request payload is identical to a previous payload sent in the last 10 minutes. Try to submit payload after {secondsRemaining} seconds (seconds remaining replaced with actual value).
If the request hash value of the document is not the same as the hash we compute based on the document.
Document hash is not valid.
IssueDate
orIssueTime
missing in the document.IssueDate OR IssueTime is missing in the document.
IssueDate
orIssueTime
are not valid date times.IssueDate OR IssueTime is not in a valid format.
IssueDateTime
(which is created combiningIssueDate
andIssueTime
from document) is over 72 hours in the past.Issuance date time value of the document is too old that cannot be submitted.
If
IssueDateTime
is in the future.Document issuance date time is in the future.
UUID
is not found.Document UUID :uuid is not found. Please ensure the UUID is correct.