Skip to main content

Connect a tax account

Use this API to connect your invoice lookup account on the General Department of Taxation (TCT) portal, which is the basis for syncing the business's purchase invoices.

POST
URLhttps://open-api.tingee.vn/v1/e-invoice/input/connect

Connect a General Department of Taxation (TCT) account to an e-invoice account.

Header Request​

HeaderRequiredDescription
Content-Type✓application/json
x-client-id✓Partner identifier issued by TINGEE.
x-signature✓HMAC SHA512 authentication signature. See How to generate the signature.
x-request-timestamp✓Time the request is sent (format: yyyyMMddHHmmssSSS, UTC+7)

Body Parameter​

FieldTypeRequiredDescription
merchantIdnumber~Merchant ID
(Required if you connect with a Master Merchant account).
accountIdnumber✕E-invoice account ID (from List accounts). Leave empty to use the default account.
tctUsernamestring✕Username for the General Department of Taxation e-invoice portal. Leave empty to use the information saved in the business profile at the provider.
tctPasswordstring✕Password for the General Department of Taxation e-invoice portal. Leave empty to use the saved information.

Code samples​

curl --location --request POST 'https://open-api.tingee.vn/v1/e-invoice/input/connect' \
--header 'accept: application/json' \
--header 'x-client-id: YOUR_CLIENT_ID' \
--header 'x-request-timestamp: 20240509154004003' \
--header 'x-signature: YOUR_SIGNATURE' \
--header 'Content-Type: application/json' \
--data '{
"tctUsername": "0101234567",
"tctPassword": "YOUR_TCT_PASSWORD"
}'

Sample Response​

{
"code": "00",
"message": "Success",
"data": "Kết nối thành công"
}
FieldTypeDescription
codestringResult code (00 = Success).
messagestringResponse message.
datastringResult message from the provider.

Common error codes​

CodeDescriptionHow to handle
400Failed to connect the TCT accountCheck tctUsername / tctPassword. message contains the details.
2036The account is not registered for the purchase invoice serviceUpdate the account so that services contains input-invoice via the Create/Update account API.
2007The provider is not supportedPurchase invoices only support x-cyber provider accounts.
2032No default account is configuredPass accountId, or set an account as the default.
1057Account information not foundCheck accountId.
1095, 1096Master Merchant merchantId errorPass a merchantId belonging to the Master Merchant calling the API.
90, 91, 92, 97Request authentication error (timestamp, client-id, signature)See System error codes.
OthersOther errorsSee Error codes.