Detailed description
Request Address:
POST https://merchant.truemoney.com.vn/api/v1/service/requestTransaction
Format: Json
Max request time out: 30 seconds
Parameter | Description |
---|---|
username* String |
User Name. |
apiCode* String |
API account code, provided when registering an account. |
apiUsername* String |
API account name, provided when registering an account. |
requestId* String |
Transaction code generated from the partner. In all transactions arising from the partner, this code should not overlap. The transaction code includes only: [a-z] [A-Z] [0-9] {_, -}, and up to 36 characters. |
serviceCode* String |
Service code (section 4.1 in service codes and nominal value Table) |
transactionId* String |
Id of the transaction partner wants to query (In case of timeout and partner does not receive the transactionId, we can use the partner’s previous requestId when implementing the API topup, in which case the query API parameter would be txnRequestId). |
phoneNumber* String |
Phone numbers make topup. |
dataSign* String |
Signature, merchant can use signature to control security. Digital signatures are encrypted using the 1024 bit RSA algorithm using the partner’s private key:
plainText = username + “|” + apiCode + “|” + apiUsername + “|” + serviceCode + “|” + requestId dataSign = createSign(plainText , “privateKey”) |
(*) Response return system takes the form of json.
After processing the received datas, the system will return the content in json format including the following parameters:
{“status”: {“value”: ” < Message > “,”code”: “< Code
>”},”transaction”: {“id”: “<Id transaction>”,”cif”: “<CIF number of partner account>”,”amount”: “< Total amount of transaction >”,”commision”: “< Discount for partner >”,”fee”: “< Fee>”,”price”: “< Card value>”,”quantity”: “< Quantity
>”,”realAmount”: “< RealAmount >”,”lastBalance”: “< Last Balance >”,”currentBalance”: “< current Balance >”,”info”: “<Details>”,”serviceType”: “<Service Type>”,”subject”: “Title”,”errorCode”: “< Error code >”,”errorMessage”: “< Message >”,”transactionStatus”: “< Transaction status>”,”creationDate”: “< Creation date >”,”serviceCode”: “<Service code>”,”serviceName”: “< Service name> “,”telcoType”: “< Telco type>”,”serials”: [{“serial”: “< Serial >”,”pin”: “<Pin>”,”price”: “< Price >”,”cardType”: “< Card Type>”,”expiredDate”: “< ExpiredDate >”}]},”dataSign”: “<Signature>”}
dataSign is encrypted using the RSA 1024 algorithm:
plainText = code + “|” + balance
dataSign = createSign(plainText , “privateKey”)
Service Code | Type of service | Denominations | Function |
---|---|---|---|
040101 | EPIN | 10000|20000|30000|50000|100000|200000|300000|500000 | Buy Viettel card |
040102 | EPIN | 10000|20000|30000|50000|100000|200000|300000|500000 | Buy Vinaphone card |
040103 | EPIN | 10000|20000|30000|50000|100000|200000|300000|500000 | Buy Mobifone card |
040104 | EPIN | 10000|20000|30000|50000|100000|200000|300000|500000 | Buy Gmobile card |
040105 | EPIN | 10000,20000|50000|100000|200000|300000|500000 | Buy Vietnamobile card |
040106 | EPIN | 10000|20000|50000|60000|100000|120000|200000|500000 | Buy Zing card |
040107 | EPIN | 10000|20000|50000|100000|200000|500000 | Buy Gate card |
040108 | EPIN | 10000|20000|50000|100000|200000|300000|500000 | Buy VTC Online card |
040109 | EPIN | 20000|50000|100000|200000|500000 | Buy Garena card |
040110 | EPIN | |10000|20000|30000|50000|100000|200000|300000|500000|1000000|2000000 | Buy Vinplay card |
040111 | EPIN | |10000|20000|30000|50000|100000|200000|300000|500000| | Buy OnCash card |
040115 | EPIN | 50000|100000|200000|300000|500000|1000000|2000000|3000000|5000000 | Buy Appota card |
040116 | EPIN | 20000|50000|70000|100000|120000|150000 | Buy 3G Vina card |
040117 | EPIN | 1000|2000|3000|5000|10000|14000|20000|28000|42000|56000|84000 | Buy 3G Mobifone card |
040118 | EPIN | 50000|100000 | Buy 3G Viettel card |
040119 | EPIN | 10000|20000|50000|100000|200000|500000|1000000|2000000|5000000 | Buy Soha card |
060000 | PHONE_TOPUP | 10000|20000|30000|50000|100000|200000|300000|500000 | Phone Topup |
100000 | CHECK_BALANCE | Check Balance | |
110000 | TXN_DETAIL | Query API |
Status Code | Description |
---|---|
0 | Successful |
1 | Transaction failed |
2 | Incorrect authentication information |
800 | Insufficient balance |
901 | Invalid login information |
903 | Invalid login information |
1001 | Topup provider is down or maintenance |
2000 | Input parameter is incorrect |
2001 | Topup input parameter is incorrect |
2002 | ePIN input parameter is incorrect |
2003 | Phone number is incorrect |
2005 | Duplicate transaction |
4501 | Transations to Telco are over time (Time-out) |
4601 | Network connection is not available |
4602 | Service error |
Telco Code | Provider name |
---|---|
VNP | Vinaphone |
VMS | Mobifone |
BEELINE/GMOBILE | GMobile |
VNM | VietnamMobile |
ZING | Zing |
GATE | Gate |
VTC/VCOIN | VTC Online |
GARENA | Garena |