MiGS (MasterCard Internet Gateway Service) is a service from Mastercard to refund and monitor thetransaction report based on thetransaction between Merchant and Customer.
Currently, NICEPAY using MPGS (Mastercard Payment Gateway Service) that the latest version of MiGS to increase thetransaction security with 3Ds 2.0 feature. Although, MiGS API still used on MPGS system.
Use this API if get paymentType = 3 from onePassToken.do response .
Steps:
Send Request Parameters to MIGS Request API.
Customer will be redirect to MIGS page.
Customer input OTP.
NICEPAY will send Response Parameter to callbackUrl.
Register Transaction and Charge Credit Card using onePassToken
Merchant Token
SHA256 (iMid+ referenceNo+ amt+ merchantKey)
Payment Methods
01Credit Card
Request Parameter - Credit Card Registration
Sample API Payment
Sample Java Request Credi Card
1iMid:"IONPAYTEST"2payMethod:"01"3currency:"IDR"4amt:"10000"5referenceNo:"MerchantReferenceNumber001"6goodsNm:"Merchant Goods 1"7billingNm:"John Doe"8billingPhone:"08123456789"9billingEmail:"john.doe@example.com"10billingAddr:"Jln.Raya Kasablanka Kav.88"11billingCity:"South Jakarta"12billingState:"DKI Jakarta"13billingPostCd:"10200"14billingCountry:"Indonesia"15callBackUrl:"https://www.merchant.com/callbackUrl/"16dbProcessUrl:"https://www.merchant.com/dbProcessUrl/"17description:"This Is The Description Of The Payment"18merchantToken:"2349fcbd3a5b81d08ca719cc6d9c826f2f6f9d4de337b86e4019114aad6222b1"19userIP:"::1"20cartData:"{}"21instmntType:"1"22instmntMon:"1"23onePassToken:"9338d54573688ae18e175240b0257de48d89c6ef1c9c7b5c094dc4beed9e435f"24cardCvv:"100"25recurrOpt:"1"
0 : Automatic Cancel
1 : Do not cancel
2 : Do not make token
1
billingAddr
AN
255
Billing Address
Jln. Raya Kasablanka Kav.88
deliveryNm
A
30
Delivery Name
Merchant's Name
deliveryPhone
N
15
Delivery Phone
08123456789
deliveryAddr
AN
100
Delivery Address
Jln. Dr. Saharjo No.88
deliveryEmail
AN
100
Delivery E-Mail
example@merchant.com
deliveryCity
A
50
Delivery City
South Jakarta
deliveryState
A
50
Delivery State
DKI Jakarta
deliveryPostCd
N
10
Delivery Post Number
10201
deliveryCountry
A
A
Delivery Country
Indonesia
vat
N
12
VAT
0
fee
N
12
Service Tax
0
notaxAmt
N
12
Tax Free Amount
0
reqDt
N
N
Request Date (YYYYMMDD)
20230516
reqTm
N
N
Request Time (HH24MISS)
135959
reqDomain
ANS
100
Request Domain
www.merchant.com
reqServerIP
ANS
15
Request Server IP
127.0.0.1
reqClientVer
ANS
50
Request Client Version
1.0
userSessionID
AN
100
User Session ID
userSessionID
userAgent
ANS
100
User Agent Information
Mozilla
userLanguage
ANS
2
User Language
en-US
Response Parameter - Credit Card Payment
Sample Respone Payment
1{2"ccTransType":"1",3"fee":null,4"tXid":"IONPAYTEST01202305162316067832",5"description":"Description",6"notaxAmt":null,7"cardNo":"51234500****0008",8"issuBankCd":"CENA",9"preauthToken":null,10"cardExpYymm":"3901",11"acquBankNm":"CIMB",12"payMethod":"01",13"callbackUrl":"https://www.merchant.com/callback/",14"instmntMon":"1",15"currency":"IDR",16"issuBankNm":"BCA",17"resultCd":"0000",18"amount":"10000",19"goodsNm":"Merchant Goods 1",20"referenceNo":"MerchantReferenceNumber001",21"transTm":"231641",22"authNo":"041385",23"recurringToken":"88cb7e30c531429a95fb2af442f591b75939fd0387288af2dc2340c50776d84a"//Only For Recurring,24"preAuth":"c2921cc7a1967f905fd4f895f22f06c02d24adf8c9f7b169d6ef0c2c0b128549"//Only For PreAuth,25"vat":null,26"instmntType":"1",27"resultMsg":"SUCCESS",28"billingNm":"John Doe",29"acquBankCd":"BNIA",30"transDt":"20230516"31}
When theMerchant signs contract as Recurring, NICEPAY give a RecurringToken to thePaymentAPI Response. The Merchant can use RecurringToken for the next PaymentAPI Request without input card detail, except cardCVV (Mandatory).
Recurring Issue
To do the Recurring payment, thesystem need recurringToken own from theCustomer to use theCustomerinformation continuously without reinputting the card data multiple times. recurringToken receives after theCustomerproceeds the initial payment. Following are the steps to get therecurringToken .
The Customer will input the data card such as cardNo and ExyMmYy through API Request Token (onePassToken.do).
The Customer will get cardToken.
Recurring paymentprocess on V1 Enterprise divide into 2 process , Direct 3Ds and Direct Non-3Ds.
If going through the 3Ds process, then the card data will going through the security verification from API 3Ds Request (secureVeRequest.do) with an OTP also FDS (Fraud Detection System) NICEPAY security.
If not going through 3Ds process, then will not going through the security verification.
The Customer does payment with APICredit CardPayment (onePass.do) and get recurringToken to proceedthe recurring payment.
After get therecurringToken from the initial payment success or result from card registration process, thesystem will use that recurringToken to execute the next schedule. Following is thepayment steps on thesystem using therecurringToken.
InputrecurringToken gain from the initial paymentprocess (recurringToken.do) or the result from card registration process(tokenize.do).
Next, cardToken will gain and save on the database to use on the next payment.
Special for the 3Ds process, card data will go through the security verification from API 3Ds Request (secureVeRequest.do) with an OTP also FDS (Fraud Detection System) NICEPAY security using cardToken gain from the previous step.
The payment will proceed using API Recurring Payment (recurringTrans.do).
This process will proceed continuously on the recurring period.
On the next recurring payment, recurringToken will originate from recurringToken.do . onePass.do only use during the first recurring payment.
API Specifications - Recurring Payment
API Endpoint
/nicepay/api/recurringTrans.do
Method
application/x-www-form-urlencoded
POST
Merchant Token
SHA256(Merchant ID + Reference Number + Amount + MerchantKey)
Description
The APIPayment for Credit Card Recurring or payment with Recurring Token
0 Automatic Cancel
1 Do Not Cancel
2 Do Not Make Token
1
billingAddr
AN
255
Billing Address
Jln. Raya Kasablanka Kav.88
deliveryNm
A
30
Delivery Name
Merchant's Name
deliveryPhone
N
15
Delivery Phone
08123456789
deliveryAddr
AN
100
Delivery Address
Jln. Dr. Saharjo No.88
deliveryEmail
ANS
100
Delivery E-Mail
example@merchant.com
deliveryCity
A
50
Delivery City
South Jakarta
deliveryState
A
50
Delivery State
DKI Jakarta
deliveryPostCd
N
10
Delivery Post Number
10201
deliveryCountry
A
A
Delivery Country
Indonesia
vat
N
12
VAT
0
fee
N
12
Service Tax
0
notaxAmt
N
12
Tax Free Amount
0
reqDt
N
N
Request Date (YYYYMMDD)
20230516
reqTm
N
N
Request Time (HH24MISS)
135959
reqDomain
ANS
100
Request Domain
www.merchant.com
reqServerIP
ANS
15
Request Server IP
127.0.0.1
reqClientVer
ANS
50
Request Client Version
1.0
userSessionID
AN
100
User Session ID
userSessionID
userAgent
ANS
100
User Agent Information
Mozilla
userLanguage
ANS
2
User Language
en-US
Response Parameter - Recurring Payment
Sample Response Recurring Payment
1{2"issuBankNm":"BCA",3"resultCd":"0000",4"amount":"10000",5"ccTransType":"2",6"authNo":"048797",7"referenceNo":"MerchantReferenceNumber001",8"transTm":"224646",9"fee":null,10"vat":null,11"tXid":"IONPAYTEST01202305212240279260",12"description":"This Is The Description Of The Payment",13"notaxAmt":null,14"cardNo":"51234500****0008",15"issuBankCd":"CENA",16"instmntType":"1",17"resultMsg":"SUCCESS",18"acquBankCd":"BNIA",19"cardExpYymm":"3901",20"acquBankNm":"CIMB",21"payMethod":"01",22"callbackUrl":"https://www.merchant.com/callbackUrl/",23"instmntMon":"1",24"transDt":"20230516"25}
This API uses specific on Credit Card with Recurring type to create therecurringToken without doing thepaymenttransactionprocess beforehand, but only going through the card information registration process. recurringToken that created successfully can be used for transactionprocess (recurringTrans.do).
API Specification - Generate Recurring Token Without First Payment
API Endpoint
/nicepay/api/tokenize.do
Method
application/x-www-form-urlencoded
POST
Description
To generate Credit Card's Recurring Token without proceed through thepaymentprocess beforehand.
Merchant Token
SHA256 (Merchant ID + Card No + Card Exp Yymm + Merchant Key)
To do Pre-Auth & Capture payment, thesystem need preauthToken to proceedthe capture process. That process only can proceed during thepreauthToken validity period. Following are thepayment steps on thesystem using Pre-Auth Token.
The Customer will input the data card such as cardNo and ExyMmYy through API Request Token (onePassToken.do).
The Customer will get cardToken.
The Pre-Auth process on V1 Enterprise divides into 2 processes, Direct 3Ds, and Direct Non-3Ds.
If going through the 3Ds process, then the card data will go through the security verification from API 3Ds Request (secureVeRequest.do) with an OTP also FDS (Fraud Detection System) NICEPAY security.
If not go through the 3Ds process, then will not go through the security verification.
The Customer does a payment with APICredit CardPayment (onePass.do).
The system does hold process and gets preauthToken to proceed with theprocess.
The capture amount process will use API Pre-Auth (captureTrans.do) by input preauthToken and CVV.
If preauthToken expired, then payment will become void and the balance will refund to theCustomer.
API Specification- Pre-Auth
API Endpoint
/nicepay/api/captureTrans.do
Method
application/x-www-form-urlencoded
POST
Merchant Token
SHA256(Merchant ID + Reference Number + Amount + MerchantKey)
Deskripsi
APIPayment for Credit Card Pre-Auth using preauthToken
0 : Automatic Cancel
1 : Do Not Cancel
2 : Do Not Make Token
1
billingAddr
AN
255
Billing Address
Jln. Raya Kasablanka Kav.88
deliveryNm
A
30
Delivery Name
Merchant's Name
deliveryPhone
N
15
Delivery Phone
08123456789
deliveryAddr
AN
100
Delivery Address
Jln. Dr. Saharjo No.88
deliveryEmail
AN
100
Delivery E-Mail
example@merchant.com
deliveryCity
A
50
Delivery City
South Jakarta
deliveryState
A
50
Delivery State
DKI Jakarta
deliveryPostCd
N
10
Delivery Post Number
10201
deliveryCountry
A
A
Delivery Country
Indonesia
vat
N
12
VAT
0
fee
N
12
Service Tax
0
notaxAmt
N
12
Tax Free Amount
0
reqDt
N
N
Request Date (YYYYMMDD)
20230516
reqTm
N
N
Request Time (HH24MISS)
135959
reqDomain
ANS
100
Request Domain
www.merchant.com
reqServerIP
ANS
15
Request Server IP
127.0.0.1
reqClientVer
ANS
50
Request Client Version
1.0
userSessionID
AN
100
User Session ID
userSessionID
userAgent
ANS
100
User Agent Information
Mozilla
userLanguage
ANS
2
User Language
en-US
Response Parameter - Pre-Auth
Sample Response Pre-Auth
1{2"issuBankNm":"BCA",3"resultCd":"0000",4"amount":"1000",5"ccTransType":"4",6"authNo":"051837",7"referenceNo":"MerchantReferenceNumber001",8"transTm":"234619",9"fee":null,10"vat":null,11"tXid":"IONPAYTEST01202305212346199270",12"description":"This Is The Description Of The Payment",13"notaxAmt":null,14"cardNo":"51234500****0008",15"issuBankCd":"CENA",16"instmntType":"1",17"resultMsg":"SUCCESS",18"acquBankCd":"BNIA",19"cardExpYymm":"3901",20"acquBankNm":"CIMB",21"payMethod":"01",22"callbackUrl":"https://www.merchant.com/callbackUrl",23"instmntMon":"1",24"transDt":"20230516"25}
Press space bar to start a drag.
When dragging you can use the arrow keys to move the item around and escape to cancel.
Some screen readers may require you to be in focus mode or to use your pass through key
Press space bar to start a drag.
When dragging you can use the arrow keys to move the item around and escape to cancel.
Some screen readers may require you to be in focus mode or to use your pass through key
Press space bar to start a drag.
When dragging you can use the arrow keys to move the item around and escape to cancel.
Some screen readers may require you to be in focus mode or to use your pass through key
Press space bar to start a drag.
When dragging you can use the arrow keys to move the item around and escape to cancel.
Some screen readers may require you to be in focus mode or to use your pass through key
Press space bar to start a drag.
When dragging you can use the arrow keys to move the item around and escape to cancel.
Some screen readers may require you to be in focus mode or to use your pass through key
Press space bar to start a drag.
When dragging you can use the arrow keys to move the item around and escape to cancel.
Some screen readers may require you to be in focus mode or to use your pass through key
Press space bar to start a drag.
When dragging you can use the arrow keys to move the item around and escape to cancel.
Some screen readers may require you to be in focus mode or to use your pass through key
Press space bar to start a drag.
When dragging you can use the arrow keys to move the item around and escape to cancel.
Some screen readers may require you to be in focus mode or to use your pass through key
Press space bar to start a drag.
When dragging you can use the arrow keys to move the item around and escape to cancel.
Some screen readers may require you to be in focus mode or to use your pass through key
Press space bar to start a drag.
When dragging you can use the arrow keys to move the item around and escape to cancel.
Some screen readers may require you to be in focus mode or to use your pass through key
Press space bar to start a drag.
When dragging you can use the arrow keys to move the item around and escape to cancel.
Some screen readers may require you to be in focus mode or to use your pass through key
Press space bar to start a drag.
When dragging you can use the arrow keys to move the item around and escape to cancel.
Some screen readers may require you to be in focus mode or to use your pass through key
Press space bar to start a drag.
When dragging you can use the arrow keys to move the item around and escape to cancel.
Some screen readers may require you to be in focus mode or to use your pass through key
Press space bar to start a drag.
When dragging you can use the arrow keys to move the item around and escape to cancel.
Some screen readers may require you to be in focus mode or to use your pass through key
Press space bar to start a drag.
When dragging you can use the arrow keys to move the item around and escape to cancel.
Some screen readers may require you to be in focus mode or to use your pass through key
Press space bar to start a drag.
When dragging you can use the arrow keys to move the item around and escape to cancel.
Some screen readers may require you to be in focus mode or to use your pass through key
Press space bar to start a drag.
When dragging you can use the arrow keys to move the item around and escape to cancel.
Some screen readers may require you to be in focus mode or to use your pass through key
Press space bar to start a drag.
When dragging you can use the arrow keys to move the item around and escape to cancel.
Some screen readers may require you to be in focus mode or to use your pass through key
Press space bar to start a drag.
When dragging you can use the arrow keys to move the item around and escape to cancel.
Some screen readers may require you to be in focus mode or to use your pass through key
Press space bar to start a drag.
When dragging you can use the arrow keys to move the item around and escape to cancel.
Some screen readers may require you to be in focus mode or to use your pass through key