Skip to main content

Create a Merchant account

Use this API as a Master Merchant (Gateway Partner) to create accounts for the sub-Merchants in your system.

POST
URLhttps://open-api.tingee.vn/v1/merchant/create

Create a new Merchant entity to start integrating Tingee's payment services.

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
namestring✓Merchant display name (up to 500 characters).
phoneNumberstring✓Primary contact phone number: 10 characters, starting with 0.
If the phone number already exists on TINGEE, the system links the existing Merchant to the Master Merchant instead of creating a new one.
passwordstring✕Merchant account password: at least 6 characters, including at least 1 lowercase letter, 1 uppercase letter, 1 digit and 1 special character.
If you pass it, the user must change the password on first login. If you omit it, Tingee sets a default password for the Merchant.
emailstring✕Contact email address, in a valid email format and not already used by another Merchant.
websitestring✕Merchant website (up to 256 characters).
codestring✕Your own identifier (Partner's Internal ID), up to 20 characters and not already used by another Merchant.
businessSectorIdsnumber[]✕List of the Merchant's business sector IDs.
provinceIdstring✕Province/city code (up to 20 characters).
districtIdstring✕District code (up to 20 characters).
communeIdstring✕Ward/commune code (up to 20 characters).
addressstring✕Address (house number, street), up to 125 characters.
fullAddressstring✕Full address, up to 250 characters.
referralCodestring✕Referral code (if any), up to 50 characters. Whitespace is removed.

Code samples​

curl --location --request POST 'https://open-api.tingee.vn/v1/merchant/create' \
--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 '{
"name": "Doanh nghiệp Vận tải Miền trung",
"phoneNumber": "0946881502",
"email": "vantaimientrung@gmail.com",
"website": "https://vtmt.com"
}'

Sample Response​

{
"code": "00",
"message": "Success",
"data": {
"merchantId": 12345
}
}
FieldTypeDescription
codestringResult code (00 = Success).
messagestringResponse message.
data.merchantIdnumberID of the newly created Merchant (or of the existing Merchant linked by phoneNumber).

Common error codes​

CodeDescriptionHow to handle
1133Permission deniedThis API is for Master Merchant accounts only; check the x-client-id you are using.
90, 91, 92, 97Request authentication error (timestamp, client-id, signature)See System error codes.
OthersOther errorsSee Error codes.