Skip to main content

Create / update a bank configuration

Use this API to create or update the bank connection configuration for a Merchant account. When you send the same bankBin, the system automatically creates a new configuration or overwrites the current one.

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

Create or update the bank integration configuration for a Merchant.

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).
bankBinstring✕Bank BIN. Takes precedence over bankName if you pass both.
bankNamestring✕Bank name (e.g. ACB, BIDV, CTG). Required if you do not pass bankBin.
accountTypestring✓Account type: business-account (business) or business-household-account (household business).
idnumber✕ID of the existing configuration (pass it to update, leave it empty to create).
otpNumberstring✕Confirmation OTP (required by some banks).
confirmIdstring✕Confirmation code received after the ACB configuration registration step.
bidvConfigDtoobject~Configuration for BIDV. Pass it when bankBin is BIDV.
bidvConfigDto.accountNumberstring✓BIDV bank account number.
bidvConfigDto.accountNamestring✓BIDV account holder name.
bidvConfigDto.vaPrefixstring✓BIDV Virtual Account prefix.
bidvConfigDto.bankPartnerIdstring✓Partner code issued by BIDV.
ctgConfigDtoobject~Configuration for VietinBank (CTG). Pass it when bankBin is VietinBank.
ctgConfigDto.accountNumberstring✓VietinBank bank account number.
ctgConfigDto.accountNamestring✓VietinBank account holder name.
ctgConfigDto.vaPrefixstring✓VietinBank Virtual Account prefix.
acbConfigDtoobject~Configuration for ACB. Pass it when bankBin is ACB.
acbConfigDto.accountNumberstring✓ACB bank account number.
acbConfigDto.accountNamestring✓ACB account holder name.
acbConfigDto.vaPrefixstring✓Virtual Account prefix.
acbConfigDto.mobilestring✓Phone number registered to receive OTPs.
acbConfigDto.acbUserIdstring✓ACB Online / Biz login user ID.
msbConfigDtoobject~Configuration for MSB. Pass it when bankBin is MSB.
msbConfigDto.accountNumberstring✓MSB bank account number.
msbConfigDto.vaPrefixstring✓Virtual Account prefix.
msbConfigDto.mobilestring✓Registered phone number.
msbConfigDto.merchantIdstring✓Merchant code issued by MSB.
msbConfigDto.terminalIdstring✓Terminal code issued by MSB.
msbConfigDto.accessCodestring✓Access code issued by MSB.
msbConfigDto.referralCodestring✓Referral code issued by MSB.
baokimConfigDtoobject~Configuration for the BaoKim e-wallet. Pass it when bankBin is BAOKIM.
baokimConfigDto.walletIdstring✕BaoKim wallet ID.
baokimConfigDto.accountNamestring✕BaoKim wallet holder name.
baokimConfigDto.midstring✕Merchant ID (MID) issued by BaoKim.
baokimConfigDto.privateKeystring✕Private key issued by BaoKim.

Code samples​

curl --location --request POST 'https://open-api.tingee.vn/v1/merchant/create-or-update-config' \
--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 '{
"bankBin": "970418",
"accountType": "business-account",
"bidvConfigDto": {
"accountNumber": "1234567890",
"accountName": "CONG TY TNHH ABC",
"vaPrefix": "TINGEE",
"bankPartnerId": "PARTNER_001"
}
}'

Sample Response​

{
"code": "00",
"message": "Success",
"data": 125
}
FieldTypeDescription
codestringResult code (00 = Success).
messagestringResponse message.
datanumberID of the configuration that was created or updated.

Common error codes​

CodeDescriptionHow to handle
1065OTP has expiredA confirmId is only valid for about 4 minutes; call Register business account configuration again to get a new confirmId and confirm immediately.
1080Incorrect ConfirmIdUse the exact confirmId returned for the same Merchant.
1013Configuration does not existWhen updating, check the configuration id (from Configuration list); omit id to create a new one.
1095, 1096Master Merchant merchantId errorPass the merchantId of a sub-Merchant that belongs 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.