Create a token
It is possible to keep customer’s card as token without making transaction. Call up as follows.
If you need to connect a token, submit a request to the bank.
1. Create an invoice
Create invoice without transaction amount on the token request. Bank generates the transaction amount randomly. 1-2 minutes after the transaction is complete, the refund is made to the customer. Create a request according to the format below and send it to, https://ecommerce.golomtbank.com/api/confirmation by Post method.
{
"callback": "string",
"checksum": "string",
"returnType": "string",
"transactionId": "string"
}
Parameter definition
Parameters | Type | Тайлбар |
---|---|---|
callback | String | Merchant’s ulr for callback or redirect from the customer’s browser |
checksum | String | checksum = transactionId +amount + returnType + callback |
returnType | String | POST GET value of redirect method to the merchant’s url. Call up thr app deeplink for MOBILE |
transactionId | String | Merchant’s transaction number. |
Response of successful transaction
{
"checksum": "9ac76e1ecd0cb23b25cf2dbf976de7bc4d6ff11aebfbd83216aae29be16534b8",
"transactionId": "test12345",
"invoice": "d7fb2858-df36-469e-b40d-2815fe9215cf"
}
Parameter definition
Parameter | Type | Definition |
---|---|---|
checksum | String | Банк талаас үүсгэх checksumchecksum = invoice + transactionId |
transactionId | String | Мерчантын гүйлгээний дугаар байна |
invoice | String | Тухайн гүйлгээний дугаар дээр үүссэн нэмэмжлэхийн дугаар |
2. Call up a page
Call up the card filling page on the customer’s browser using the invoice number.
Call up the URL on customer’s web as follows:
https://ecommerce.golomtbank.com/confirmation/ mn
or en
/ invoice
- Language option is for card information page: Mongolian-mn or English-en.
- invoice is number created by the bank as response to invoice request.
Sample URL:
https://ecommerce.golomtbank.com/confirmation/mn/4f2b614f-730b-406d-aaab-41ce2610fb36
https://ecommerce.golomtbank.com/confirmation/en/f64a28d8-7780-4b1a-b0f1-dee001ba741d
3. Get a token
Check if token request is successful and then get the token number. Create the request as follows and send it to https://ecommerce.golomtbank.com/api/get/token by POST method
{
"checksum": "string",
"transactionId": "string"
}
Параметрийн тайлбар
Parameters | Type | Definition |
---|---|---|
checksum | String | checksum = transactionId + transactionId |
transactionId | String | Merchant’s transaction number. |
Response for successful transaction
{
"bankCode": "159999",
"bank": "Голомт банк",
"errorDesc": "Амжилттай",
"checksum": "c7780078c2b8abacbce594bb7951d9d24c47858de683f9b6bc2e6d19adf965ae",
"errorCode": "000",
"cardHolder": "Gantulga A",
"transactionId": "test12345",
"cardNumber": "515023******7733",
"token": "cdbd3c51601db4a147c619ac592ca0cdca591ca1321a3059c4be5a81808175a7"
}
Parameter definition
Parameter | Type | Definition |
---|---|---|
bankCode | String | Card issuer bank |
errorDesc | String | Transaction status definition |
checksum | String | checksum = transactionId + token |
errorCode | String | See transaction status code here |
cardHolder | String | Card holder |
transactionId | String | Merchant's transaction number |
cardNumber | String | Transaction card number |
token | String | Token number to present the card |