VIETTEL MILITARY INDUSTRY AND TELECOM GROUP
VIETTEL TELECOM
S-invoice
Technical service description
Ha Noi, 09/2018
2.1 WS Invoice profession (/InvoiceAPI/InvoiceWS) 4
2.1.2 Webservice gets the invoice file. 30
2.1.3 Webservice gets the invoice file Portal. 33
2.1.4 Webservice gets converted invoice(pdf) 35
2.1.5 Webservice cancels invoice. 38
2.1.6 Webservice searchs invoice. 39
2.1.7 Web service metadata. 44
2.1.8 Webservice draft invoicing. 49
2.1.9 Webservice batch invoicing. 64
2.1.10 Webservice updates Tax declaration. 67
2.1.11 Webservice provides using invoice status 68
2.1.12 Webservice gets invoice list in period. 70
2.1.13. Webservice sends email to customer. 72
2.1.14. Webservice invoicing signing with USB token. 73
2.1.15. Webservice inserts signature to USB token. 76
The connection model between external system and Sinvoice:
The role of Sinvoice system are receiving invoice data from outside and issued as invoice form that selected by the enterprise. The SInvoice System APIs are provided under the Restful Webservice standard, which supports both XML and Json.
Firstly, the enterprise performed the operation of declaring the invoice form on the website of SInvoice system including:
After filling out the information, the enterprise can go through the external system to call the API to:
Explaination:
Error code |
Description |
200 OK |
Success |
201 Created |
Success of a resource creation when using the POST method |
400 Bad Request |
The request parameters are incomplete or missing |
403 Forbidden |
The action or the request URI is not allowed by the system |
404 Not Found |
The resource referenced by the URI was not found |
422 Unprocessable Entity |
One of the requested action has generated an error |
429 Too Many Requests |
Your application is making too many requests and is being rate limited |
500 Internal Server Error |
Used in case of time out or when the request, otherwise correct, was not able to complete. |
Test link: https://demo-sinvoice.viettel.vn:8443/InvoiceAPI
Authenticated by string user:pass encrypted under base 64
Ex: user/pass: 0100109106-997/123456a@A (Real password will be send later)
Input string will be encrypted : 0100109106-997:123456a@A
Encrypt string: MDEwNDgzMTAzMDoxMjM=
Notice: The system difined a “white list” IP address and only allow access to web service with user that use IP in that list. To update IP, user can:
S1: Go to the webstie
B2. Click on: Enterprise management/ User management.
B3. Search for user that need to be update IP and click update button.
B4: IP addressese were declared by the following format:
Ex: 2.2.2.2|3.3.3.3|4.4.4.4
In case of invalid password/account IP address will receive the result: 500 Request Fail.
Web services that send data can be JSON, XML, FormParam or QueryParam
Data returned from the Web service can be either JSON or XML
Webservice shared in the case of original invoicing, invoicing for money adjustment, invoicing information adjustment and invoicing replacement.
There in:
{supplierTaxCode}: Enterprise tax code.
Field name |
Data type, constraint |
Description |
supplierTaxCode |
Required: true DataType: String Minlength: Maxlength: 11 |
Supplier’s tax code |
Ex: Json
+ Json: Original invoicing.
{
"generalInvoiceInfo":{
"invoiceType":"01GTKT",
"templateCode":"01GTKT0/170",
"invoiceSeries":"AA/17E",
"transactionUuid": "123e4567-e89b-12d3-a456-426655440000",
"invoiceIssuedDate":1517301625626,
"currencyCode":"VND",
"adjustmentType":"1",
"paymentStatus":true,
"paymentType":"TM",
"paymentTypeName":"TM",
"cusGetInvoiceRight":true,
"buyerIdNo":"123456789",
"buyerIdType":"1",
"userName":"user 1"
},
"buyerInfo":{
"buyerName":"Đặng thị thanh tâm",
"buyerLegalName":"",
"buyerTaxCode":"",
"buyerAddressLine":"HN VN",
"buyerPhoneNumber":"11111",
"buyerEmail":"",
"buyerIdNo":"123456789",
"buyerIdType":"1"
},
"sellerInfo":{
"sellerLegalName":"Đặng thị thanh tâm",
"sellerTaxCode":"0100109106-501",
"sellerAddressLine":"test",
"sellerPhoneNumber":"0123456789",
"sellerEmail":"PerformanceTest1@viettel.com.vn",
"sellerBankName":"vtbank",
"sellerBankAccount":"23423424"
},
"extAttribute":[
],
"payments":[
{
"paymentMethodName":"TM"
}
],
"deliveryInfo":{
},
"itemInfo":[
{
"lineNumber":1,
"itemCode":"ENGLISH_COURSE",
"itemName":"Khóa học tiếng anh",
"unitName":"khóa học",
"unitPrice":3500000.0,
"quantity":10.0,
"itemTotalAmountWithoutTax":35000000,
"taxPercentage":10.0,
"taxAmount":0.0,
"discount":0.0,
"itemDiscount":150000.0
}
],
"discountItemInfo":[
],
"metadata":[
],
"meterReading": [{
"previousIndex": "5454",
"currentIndex": "244",
"factor": "22",
"amount": "2"
},
{
"previousIndex": "44",
"currentIndex": "44",
"factor": "33",
"amount": "3"
}],
"summarizeInfo":{
"sumOfTotalLineAmountWithoutTax":35000000,
"totalAmountWithoutTax":35000000,
"totalTaxAmount":3500000.0,
"totalAmountWithTax":38500000,
"totalAmountWithTaxInWords":"Ba mươi tám triệu năm trăm nghìn đồng chẵn",
"discountAmount":0.0,
"settlementDiscountAmount":0.0,
"taxPercentage":10.0
},
"taxBreakdowns":[
{
"taxPercentage":10.0,
"taxableAmount":35000000,
"taxAmount":3500000.0
}
]
}
+Json: Invoice item adjustment
{
"generalInvoiceInfo":{
"invoiceType":"02GTTT",
"templateCode":"02GTTT0/012",
"invoiceSeries":"AA/17E",
"transactionUuid": "123e4567-e89b-12d3-a456-426655440000",
"invoiceIssuedDate":1505123703086,
"currencyCode":"VND",
"invoiceNote":"Điều chỉnh tăng tiền hàng, tiền thuế cho hóa đơn điện tử số AA/17E0003470 lập ngày 11/09/2017 số tiền: 52.500 ",
"adjustmentType":"5",
"adjustmentInvoiceType":"1",
"originalInvoiceId":"AA/17E0003470",
"originalInvoiceIssueDate":1505116090000,
"additionalReferenceDesc":"sdfsdf",
"additionalReferenceDate":1504976400000,
"paymentStatus":true,
"paymentType":"CK",
"paymentTypeName":"CK",
"cusGetInvoiceRight":true,
"buyerIdType":"1",
"buyerIdNo":"111905252"
},
"buyerInfo":{
"buyerName":"Trịnh Thanh Hòa",
"buyerLegalName":"Trung tâm phần mềm Viễn thông Viettel",
"buyerTaxCode":"6200000230",
"buyerAddressLine":"Tầng 42, tòa nhà Keangnam Landmark 72 - Hà Nội",
"buyerPhoneNumber":"0988236303",
"buyerEmail":"viettelsoftware@viettel.com.vn"
},
"sellerInfo":{
"sellerLegalName":"Công ty cổ phần nước sạch Lai Châu - test",
"sellerTaxCode":"6200000230-999",
"sellerAddressLine":"Lai Châu",
"sellerPhoneNumber":"023138762971",
"sellerEmail":"hoatt16_1@viettel.com.vn"
},
"extAttribute":[
],
"payments":[
{
"paymentMethodName":"CK"
}
],
"deliveryInfo":{
},
"itemInfo":[
{
"lineNumber":1,
"itemCode":"DeMenPhieuLuuKy",
"itemName":"Điều chỉnh tăng tiền hàng, tiền thuế ",
"unitName":"Quyển",
"unitPrice":50000.0,
"quantity":1.0,
"itemTotalAmountWithoutTax":50000.0,
"taxPercentage":0.0,
"taxAmount":0.0,
"adjustmentTaxAmount":1.0,
"isIncreaseItem":true,
"discount":0.0,
"itemDiscount":0.0
}
],
"discountItemInfo":[
],
"metadata":[
],
"meterReading":[
],
"summarizeInfo":{
"sumOfTotalLineAmountWithoutTax":50000.0,
"totalAmountWithoutTax":50000.0,
"totalTaxAmount":2500.0,
"totalAmountWithTax":52500.0,
"totalAmountWithTaxInWords":"Năm mươi hai nghìn năm trăm đồng",
"isTotalAmountPos":false,
"isTotalTaxAmountPos":false,
"isTotalAmtWithoutTaxPos":false,
"discountAmount":0.0,
"taxPercentage":5.0,
"isDiscountAmtPos":false
},
"taxBreakdowns":[
{
"taxPercentage":5.0,
"taxableAmount":50000.0,
"taxAmount":2500.0
}
]
}
+ Json: Invoicing adjustment.
{
"generalInvoiceInfo":{
"invoiceType":"02GTTT",
"templateCode":"02GTTT0/012",
"invoiceSeries":"AA/17E",
"transactionUuid": "123e4567-e89b-12d3-a456-426655440000",
"invoiceIssuedDate":1505124351950,
"currencyCode":"VND",
"invoiceNote":"Điều chỉnh thông tin khách hàng cho hóa đơn điện tử số AA/17E0003470 lập ngày 11/09/2017: Tên người mua: Trịnh Thanh Hòa-->Trịnh Thanh Hòa 123",
"adjustmentType":"5",
"adjustmentInvoiceType":"2",
"originalInvoiceId":"AA/17E0003470",
"originalInvoiceIssueDate":1505116090000,
"additionalReferenceDesc":"sdfsdf",
"additionalReferenceDate":1504976400000,
"cusGetInvoiceRight":true,
"buyerIdType":"1",
"buyerIdNo":"111905252"
},
"buyerInfo":{
"buyerName":"Trịnh Thanh Hòa 123",
"buyerLegalName":"Trung tâm phần mềm Viettel",
"buyerTaxCode":"6200000230",
"buyerAddressLine":"Keangnam - Hà Nội",
"buyerPhoneNumber":"0988236303",
"buyerEmail":"viettelsoftware@viettel.com.vn",
"buyerIdNo":"111905252",
"buyerIdType":"1"
},
"sellerInfo":{
"sellerLegalName":"Công ty nước Lai Châu",
"sellerTaxCode":"6200000230-999",
"sellerAddressLine":"Lai Châu",
"sellerPhoneNumber":"023138762971",
"sellerEmail":"hoatt16_1@viettel.com.vn"
},
"extAttribute":[
],
"payments":[
{
"paymentMethodName":"CK"
}
],
"deliveryInfo":{
},
"itemInfo":[
{
"lineNumber":1,
"itemName":"Điều chỉnh thông tin khách hàng cho hóa đơn điện tử số AA/17E0003470 lập ngày 11/09/2017: Tên người mua: Trịnh Thanh Hòa-->Trịnh Thanh Hòa 123",
"itemTotalAmountWithoutTax":0.0,
"taxAmount":0.0
}
],
"discountItemInfo":[
],
"meterReading":[
],
"metadata":[
],
"summarizeInfo":{
},
"taxBreakdowns":[
]
}
XML example.
+ Xml: Original invoicing
<?xml version="1.0" encoding="UTF-8" ?>
<commonInvoiceInput>
<generalInvoiceInfo>
<invoiceType>01GTKT</invoiceType>
<templateCode>01GTKT0/062</templateCode>
<invoiceIssuedDate>2017-12-26+08:43</invoiceIssuedDate>
<currencyCode>VND</currencyCode>
<adjustmentType>1</adjustmentType>
<paymentStatus>true</paymentStatus>
<paymentType>TM</paymentType>
<paymentTypeName>TM</paymentTypeName>
<cusGetInvoiceRight>true</cusGetInvoiceRight>
<buyerIdNo>123456789</buyerIdNo>
<buyerIdType>1</buyerIdType>
</generalInvoiceInfo>
<buyerInfo>
<buyerName>Lương Thị Huyền</buyerName>
<buyerLegalName></buyerLegalName>
<buyerTaxCode></buyerTaxCode>
<buyerAddressLine>HN VN</buyerAddressLine>
<buyerPhoneNumber>09880830406</buyerPhoneNumber>
<buyerEmail></buyerEmail>
<buyerIdNo>123456789</buyerIdNo>
<buyerIdType>1</buyerIdType>
</buyerInfo>
<sellerInfo>
<sellerLegalName>Supplier perfom test 1</sellerLegalName>
<sellerTaxCode>0100109106-501</sellerTaxCode>
<sellerAddressLine>test</sellerAddressLine>
<sellerPhoneNumber>0123456789</sellerPhoneNumber>
<sellerEmail>PerformanceTest1@viettel.com.vn</sellerEmail>
<sellerBankName>vtbank</sellerBankName>
<sellerBankAccount>23423424</sellerBankAccount>
</sellerInfo>
<payments>
<paymentMethodName>TM</paymentMethodName>
</payments>
<deliveryInfo />
<itemInfo>
<lineNumber>1</lineNumber>
<itemCode>ENGLISH_COURSE</itemCode>
<itemName>Khóa học tiếng anh</itemName>
<unitName>khóa học</unitName>
<unitPrice>3500000</unitPrice>
<quantity>10</quantity>
<itemTotalAmountWithoutTax>35000000</itemTotalAmountWithoutTax>
<taxPercentage>10</taxPercentage>
<taxAmount>0</taxAmount>
<discount>0</discount>
<itemDiscount>0</itemDiscount>
</itemInfo>
<summarizeInfo>
<sumOfTotalLineAmountWithoutTax>35000000</sumOfTotalLineAmountWithoutTax>
<totalAmountWithoutTax>35000000</totalAmountWithoutTax>
<totalTaxAmount>3500000</totalTaxAmount>
<totalAmountWithTax>38500000</totalAmountWithTax>
<totalAmountWithTaxInWords>Ba mươi tám triệu năm trăm nghìn đồng chẵn</totalAmountWithTaxInWords>
<discountAmount>0</discountAmount>
<taxPercentage>10</taxPercentage>
</summarizeInfo>
<taxBreakdowns>
<taxPercentage>10</taxPercentage>
<taxableAmount>35000000</taxableAmount>
<taxAmount>3500000</taxAmount>
</taxBreakdowns>
</commonInvoiceInput>
+ Xml: Invoice item adjustment
<?xml version="1.0" encoding="UTF-8" ?>
<commonInvoiceInput>
<generalInvoiceInfo>
<invoiceType>02GTTT</invoiceType>
<templateCode>02GTTT0/012</templateCode>
<invoiceIssuedDate>2017-12-26+08:43</invoiceIssuedDate>
<currencyCode>VND</currencyCode>
<invoiceNote>Điều chỉnh tăng tiền hàng, tiền thuế cho hóa đơn điện tử số AA/17E0003470 lập ngày 11/09/2017 số tiền: 52.500 </invoiceNote>
<adjustmentType>5</adjustmentType>
<adjustmentInvoiceType>1</adjustmentInvoiceType>
<originalInvoiceId>AA/17E0003470</originalInvoiceId>
<originalInvoiceIssueDate>2017-12-26+07:43</originalInvoiceIssueDate>
<additionalReferenceDesc>sdfsdf</additionalReferenceDesc>
<additionalReferenceDate>2017-12-26+07:43</additionalReferenceDate>
<paymentStatus>true</paymentStatus>
<paymentType>CK</paymentType>
<paymentTypeName>CK</paymentTypeName>
<cusGetInvoiceRight>true</cusGetInvoiceRight>
<buyerIdType>1</buyerIdType>
<buyerIdNo>111905252</buyerIdNo>
</generalInvoiceInfo>
<buyerInfo>
<buyerName>Trịnh Thanh Hòa</buyerName>
<buyerLegalName>Trung tâm phần mềm Viễn thông Viettel</buyerLegalName>
<buyerTaxCode>6200000230</buyerTaxCode>
<buyerAddressLine>Tầng 42, tòa nhà Keangnam Landmark 72 - Hà Nội</buyerAddressLine>
<buyerPhoneNumber>0988236303</buyerPhoneNumber>
<buyerEmail>viettelsoftware@viettel.com.vn</buyerEmail>
</buyerInfo>
<sellerInfo>
<sellerLegalName>Công ty cổ phần nước sạch Lai Châu - test</sellerLegalName>
<sellerTaxCode>6200000230-999</sellerTaxCode>
<sellerAddressLine>Lai Châu</sellerAddressLine>
<sellerPhoneNumber>023138762971</sellerPhoneNumber>
<sellerEmail>hoatt16_1@viettel.com.vn</sellerEmail>
</sellerInfo>
<payments>
<paymentMethodName>CK</paymentMethodName>
</payments>
<deliveryInfo />
<itemInfo>
<lineNumber>1</lineNumber>
<itemCode>DeMenPhieuLuuKy</itemCode>
<itemName>Điều chỉnh tăng tiền hàng, tiền thuế </itemName>
<unitName>Quyển</unitName>
<unitPrice>50000</unitPrice>
<quantity>1</quantity>
<itemTotalAmountWithoutTax>50000</itemTotalAmountWithoutTax>
<taxPercentage>0</taxPercentage>
<taxAmount>0</taxAmount>
<adjustmentTaxAmount>1</adjustmentTaxAmount>
<isIncreaseItem>true</isIncreaseItem>
<discount>0</discount>
<itemDiscount>0</itemDiscount>
</itemInfo>
<summarizeInfo>
<sumOfTotalLineAmountWithoutTax>50000</sumOfTotalLineAmountWithoutTax>
<totalAmountWithoutTax>50000</totalAmountWithoutTax>
<totalTaxAmount>2500</totalTaxAmount>
<totalAmountWithTax>52500</totalAmountWithTax>
<totalAmountWithTaxInWords>Năm mươi hai nghìn năm trăm đồng</totalAmountWithTaxInWords>
<isTotalAmountPos>false</isTotalAmountPos>
<isTotalTaxAmountPos>false</isTotalTaxAmountPos>
<isTotalAmtWithoutTaxPos>false</isTotalAmtWithoutTaxPos>
<discountAmount>0</discountAmount>
<taxPercentage>5</taxPercentage>
<isDiscountAmtPos>false</isDiscountAmtPos>
</summarizeInfo>
<taxBreakdowns>
<taxPercentage>5</taxPercentage>
<taxableAmount>50000</taxableAmount>
<taxAmount>2500</taxAmount>
</taxBreakdowns>
</commonInvoiceInput>
+ Xml: Invoice adjustment
<?xml version="1.0" encoding="UTF-8" ?>
<commonInvoiceInput>
<generalInvoiceInfo>
<invoiceType>02GTTT</invoiceType>
<templateCode>02GTTT0/012</templateCode>
<invoiceIssuedDate>2017-12-26+08:43</invoiceIssuedDate>
<currencyCode>VND</currencyCode>
<invoiceNote>Điều chỉnh thông tin khách hàng cho hóa đơn điện tử số AA/17E0003470 lập ngày 11/09/2017: Tên người mua: Trịnh Thanh Hòa-->Trịnh Thanh Hòa 123</invoiceNote>
<adjustmentType>5</adjustmentType>
<adjustmentInvoiceType>2</adjustmentInvoiceType>
<originalInvoiceId>AA/17E0003470</originalInvoiceId>
<originalInvoiceIssueDate>2017-12-26+07:43</originalInvoiceIssueDate>
<additionalReferenceDesc>sdfsdf</additionalReferenceDesc>
<additionalReferenceDate>2017-12-26+07:43</additionalReferenceDate>
<cusGetInvoiceRight>true</cusGetInvoiceRight>
<buyerIdType>1</buyerIdType>
<buyerIdNo>111905252</buyerIdNo>
</generalInvoiceInfo>
<buyerInfo>
<buyerName>Trịnh Thanh Hòa 123</buyerName>
<buyerLegalName>Trung tâm phần mềm Viettel</buyerLegalName>
<buyerTaxCode>6200000230</buyerTaxCode>
<buyerAddressLine>Keangnam - Hà Nội</buyerAddressLine>
<buyerPhoneNumber>0988236303</buyerPhoneNumber>
<buyerEmail>viettelsoftware@viettel.com.vn</buyerEmail>
<buyerIdNo>111905252</buyerIdNo>
<buyerIdType>1</buyerIdType>
</buyerInfo>
<sellerInfo>
<sellerLegalName>Công ty nước Lai Châu</sellerLegalName>
<sellerTaxCode>6200000230-999</sellerTaxCode>
<sellerAddressLine>Lai Châu</sellerAddressLine>
<sellerPhoneNumber>023138762971</sellerPhoneNumber>
<sellerEmail>hoatt16_1@viettel.com.vn</sellerEmail>
</sellerInfo>
<payments>
<paymentMethodName>CK</paymentMethodName>
</payments>
<deliveryInfo />
<itemInfo>
<lineNumber>1</lineNumber>
<itemName>Điều chỉnh thông tin khách hàng cho hóa đơn điện tử số AA/17E0003470 lập ngày 11/09/2017: Tên người mua: Trịnh Thanh Hòa-->Trịnh Thanh Hòa 123</itemName>
<itemTotalAmountWithoutTax>0</itemTotalAmountWithoutTax>
<taxAmount>0</taxAmount>
</itemInfo>
<summarizeInfo />
</commonInvoiceInput>
Data field’s information:
Field name |
Data type, constraint |
Description |
1) General invoice information |
||
invoiceType |
Required: true DataType: String Minlength: Maxlength: 50 Format: [a-zA-Z0-9/]+ |
Allow only these following values: 01GTKT, 02GTTT, 07KPTQ, 03XKNB, 04HGDL. Pursuant to the Decree No. 51/2010/NĐ-CP |
templateCode |
Required: true DataType: String Minlength: Maxlength: 20 Format: [a-zA-Z0-9/]+ |
Invoice template code. Pursuant to the Decree No.51/2010/NĐ-CP |
invoiceSeries |
Required : false DataType: String Minlength : 6 Maxlength : 6 Format : [a-zA-Z0-9/]+ |
Invoice serial number. Pursuant to the Decree No.51/2010/NĐ-CP. Notice: With invoice have different serial number then invoiceSeries field is required. |
invoiceIssuedDate |
Required: true DataType: Long Minlength: Maxlength: 50 Format: |
Invoice time in milliseconds . Pursuant to the Decree No.51/2010/NĐ-CP. Or these following format: "yyyy-MM-dd'T'HH:mm:ss.SSSZ", "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'", "EEE, dd MMM yyyy HH:mm:ss zzz", "yyyy-MM-dd") |
currencyCode |
Required: true DataType: String Minlength: Maxlength: 3 Format:
|
Comply with regulations of the State Bank of Vietnam. Ex: USD, VND, EUR… |
adjustmentType |
Required: true DataType: String Minlength: Maxlength: 1 Format:
|
Invoice adjustment status. |
invoiceNo |
Required: true DataType: String Minlength: 7 Maxlength: 13 Format: [a-zA-Z0-9/]+ |
Invoice number, created by getNextInvoice function.
|
invoiceNote |
Required: false DataType: String Minlength: Maxlength: 400 Format: |
Invoice note, adjustment or replacement invoicing are required . |
|
|
|
originalInvoiceId |
DataType: String Minlength: 7 Maxlength: 13 Format: [a-zA-Z0-9/]+
|
Only used for: Adjustment invoice Replacement invoice |
adjustmentInvoiceType |
DataType: String Minlength: 1 Maxlength: 1
|
Adjustment invoice type: 1: Item adjustment invoice 2: adjustment invoice |
originalInvoiceIssueDate |
DataType: Date Minlength: Maxlength: 50 Format: |
Original invoicing time, adjustment and replacement invoicing are required. |
additionalReferenceDesc |
Required : false DataType: String Minlength : Maxlength : 225 Format :
|
Written agreement between the buyer and seller on replacing or adjusting invoices, adjustment and replacement invoicing are required. |
additionalReferenceDate |
DataType: Date Minlength: Maxlength: 50 Format:
|
The date of the written agreement between the buyer and the seller. adjustment and replacement invoicing are required. |
paymentStatus |
Required: true DataType: Bollean Minlength: Maxlength: 1 Format: |
True: paid |
paymentType |
Required: false DataType: String Minlength: Maxlength: 30 Format: [a-zA-Z0-9-_./]+ |
CK – Bank transfers DTCN – Contra entry TM – Cash TM/CK – Bank transfers / Cash |
paymentTypeName |
Required: false DataType: String Minlength: Maxlength: 100 Format: |
Mode of payment: CK – Bank transfers DTCN – Contra entry TM – Cash TM/CK – Bank transfers / Cash |
cusGetInvoiceRight |
Required: true DataType: Bollean Minlength: Maxlength: 1 Format:
|
Default: true |
buyerIdType |
Required: false DataType: String Minlength: Maxlength: 1 Format:
|
Customer’s indentities paper: - 1: Indentity card - 3: Business registration certificate - 2: Passport |
buyerIdNo |
Required: false DataType: String Minlength: Maxlength: 20 Format: |
Customer’s indentities paper number. |
transactionUuid |
Required: false DataType: String Minlength: Maxlength: 36 Format: |
Transaction ID. Tip: use UUID V4. References: https://en.wikipedia.org/wiki/Universally_unique_identifier |
userName |
Required: false DataType: String
|
|
2) Buyer Information |
||
buyerName |
Required: true DataType: String Minlength: Maxlength: 255 Format: |
Buyer’s name |
buyerLegalName |
Required: false DataType: String Minlength: Maxlength: 255 Format: |
Name (business registration in case of an enterprise) of the buyer |
buyerTaxCode |
Required: false DataType: String Minlength: Maxlength: 20 Format:
|
Buyer’s tax code. Provided by General Department of Taxation. Ex 1: 0312770607 Ex 2: 0312770607-001 |
buyerAddressLine |
Required: true DataType: String Minlength: Maxlength: 255 Format: |
Buyer’s address |
buyerPhoneNumber |
Required: false DataType: String Minlength: Maxlength: 20 Format: \d+ |
Buyer’s phone number |
buyerFaxNumber |
Required: false DataType: String Minlength: Maxlength: 20 Format: \d+ |
Buyer’s fax |
buyerEmail |
Required: false DataType: String Minlength: Maxlength: 50 Format: ^[_A-Za-z0-9-\+]+(\.[_A-Za-z0-9-]+)*@[A-Za-z0-9-]+(\.[A-Za-z0-9]+)*(\.[A-Za-z]{2,})$ |
Buyer’s email. |
buyerBankName |
Required: false DataType: String Minlength: Maxlength: 100 Format: |
The name of the bank where buyer opens the trading account. |
buyerBankAccount |
Required: false DataType: String Minlength: Maxlength: 20 Format: |
Buyer’s bank account. |
buyerDistrictName |
Required: false DataType: String Minlength: Maxlength: 50 Format: |
District name. |
buyerCityName |
Required: false DataType: String Minlength: Maxlength: 25 Format: |
Province/City name |
buyerCountryCode |
Required: false DataType: String Minlength: Maxlength: 15 Format: |
Buyer’s country code. |
3) Seller information |
||
sellerLegalName |
Required: true DataType: String Minlength: Maxlength: 255 Format: |
Seller legal name. |
sellerTaxCode |
Required: true DataType: String Minlength: Maxlength: 20 Format:
|
Seller’s tax code, Provided by General Department of Taxation. Ex 1: 0312770607 Ex 2: 0312770607-001 |
sellerAddressLine |
Required: true DataType: String Minlength: Maxlength: 255 Format: |
Seller Address. |
sellerPhoneNumber |
Required: false DataType: String Minlength: Maxlength: 20 Format: \d+ |
Seller’s phone number |
sellerFaxNumber |
Required: false DataType: String Minlength: Maxlength: 20 Format: \d+ |
Seller ‘ fax. |
sellerEmail |
Required: false DataType: String Minlength: Maxlength: 50 Format: ^[_A-Za-z0-9-\+]+(\.[_A-Za-z0-9-]+)*@[A-Za-z0-9-]+(\.[A-Za-z0-9]+)*(\.[A-Za-z]{2,})$ |
Seller’s email. |
sellerBankName |
Required: false DataType: String Minlength: Maxlength: 100 Format: |
The name of the bank where seller opens the trading account. |
sellerBankAccount |
Required: false DataType: String Minlength: Maxlength: 20 Format: |
Seller’s bank account. |
sellerDistrictName |
Required: false DataType: String Minlength: Maxlength: 50 Format: |
District. |
sellerCityName |
Required: false DataType: String Minlength: Maxlength: 25 Format: |
Province/ City |
sellerCountryCode |
Required: false DataType: String Minlength: Maxlength: 15 Format: |
Seller’s country code. |
4) Payments |
||
paymentMethodName |
Required: true DataType: String Minlength: Maxlength: 50 Format: |
Mode of payment: CK – Bank transfers DTCN – Contra entry TM – Cash TM/CK – Bank transfers / Cash |
5) Items information |
||
lineNumber |
Required: true DataType: Integer Minlength: Maxlength: 5 Format: ^(?!^0)\\d{1,9}$ |
Line number. |
itemCode |
Required: false DataType: String Minlength: Maxlength: 50 Format: [a-zA-Z0-9/-_]+ |
Item’s code. |
itemName |
Required: true DataType: String Minlength: Maxlength: 300 Format: |
Item’s name. |
unitCode |
Required: false DataType: String Minlength: Maxlength: 10 Format: |
Unit code. |
unitName |
Required: true DataType: String Minlength: Maxlength: 50 Format: |
Unit name. |
unitPrice |
Required: false DataType: Double Minlength: Maxlength: 13 Format: [0-9.]+ |
Unit price. |
quantity |
Required: false DataType: Double Minlength: Maxlength: 13 Format: [0-9.]+ |
Item’s quantity. |
itemTotalAmountWithoutTax |
Required: true DataType: Double Minlength: Maxlength: 13 Format: [0-9.]+
|
Normal invoice: Total amount of goods and services without VAT. Adjustment invoice: The sum of the adjustment of goods and services without VAT |
taxPercentage |
Required: false DataType: Double Minlength: Maxlength: 13 Format: [0-9.]+ |
Tax Percentage on items, services |
taxAmount |
Required: true DataType: Double Minlength: Maxlength: 13 Format: [0-9.]+ |
Total Tax amount |
Thông tư 32/2011/TT-BTC hướng dẫn về khởi tạo, phát hành và sử dụng hóa đơn điện tử bán hàng hóa và cung ứng dịch vụ
Cách chừa hóa đơn điện tử sử dụng 2 dãy serial :
Đăng ký 2 serial AA/19E và AB/19E
Dãy AA/19E có số từ 1 - 1000
Dãy AB/19E có số từ 1 - 1000
Dãy AA/19E xuất liên tục khi có hóa đơn điện tử
Dãy AB/19E dùng để dự phòng xuất chừa hóa đơn