Payment Capture (Pre-Authorization Close)
Service Address
/PaymentDealer/DoCapture
Request Parameters
PaymentDealerAuthentication
Parameter | Explanation |
---|---|
DealerCode(string) | Dealer code issued by the Moka system |
Username (string) | Api username given by Moka system |
Password (string) | Api password given by Moka system |
CheckKey (string) | The control key (DealerCode + "MK" + Username + "PD" + Password) is created by passing this information, combined as a String, through the SHA-256 hash algorithm. Click here to go to the trial screen. |
PaymentDealerRequest
ResultCode | Explanation | ||||
---|---|---|---|---|---|
VirtualPosOrderId (string) | It is the transaction number information returned as a result of the pre-authorization process. It is the number returned with the name trxCode in 3D payments. Key: trxCode     Value : ORDER-17131QQFG04026575 | ||||
OtherTrxCode (string) | It is the unique transaction number given by the dealer when sending the Pre-Provision transaction. If VirtualPosOrderId is given, you can send this number blank. Or if you want to use your own Unique number, you can send the VirtualPosOrderId field blank | ||||
Amount (decimal) | Pre-Provision closing amount (The Kurus part is written with a dot. For example: 27.50) This amount can be equal to or less than the provision received. The sum of the amount fields sent in the SubDealer block must be equal to this field. | ||||
ClientIP (string) | IP information of the computer running the application (desktop/web) that closes the Pre-Provisioning | ||||
SubDealer (Array-List)(required) |
|
Sample Request (JSON)
{
"PaymentDealerAuthentication":{
"DealerCode":"xxx",
"Username":"xxx",
"Password":"xxx",
"CheckKey":"7c662eb7d85e9ec954ba3265d2fff6204e05d878de828ed2cdb3f0627acf4cc8"
},
"PaymentDealerRequest":{
"VirtualPosOrderId":"Test-df9e21da-e911-4ff2-a0d8-eb6bd09fad39",
"OtherTrxCode":"",
"Amount":1,
"ClientIP":"192.168.1.116",
"SubDealer":[
{
"DealerId":1774,
"Amount":1
}
]
}
}
Successful Request Result
If the sent request data has been processed successfully in Moka, "Success" information is written in the "ResultCode" field of the return object . In the "Data" field, the result of the transaction returned from the bank is found. The status of the operation is checked by checking the "IsSuccessful" (true/false) field in "Data" . If this field returns false, it can be seen why the operation failed on the virtual pos by checking the ResultCode and ResultMessage fields in the same object.
Successful Result Example
{
"Data": {
"IsSuccessful": true,
"ResultCode": "00",
"ResultMessage": ""
},
"ResultCode": "Success",
"ResultMessage": "",
"Exception": null
}
Failed Request Result
If the sent request data could not be processed in Moka streams, the "ResultCode" field of the return object contains one of the error codes in the table below.
When an unexpected software error occurs, EX is written in the "ResultCode" field and the error message (Exception) is displayed in the "ResultMessage" field
In both cases, the "Data" object arrives as null.
ResultCode | Explanation |
---|---|
PaymentDealer.CheckPaymentDealerAuthentication.InvalidRequest | The CheckKey may be bad, or the object may be bad, or the JSON may be corrupt. |
PaymentDealer.CheckPaymentDealerAuthentication.InvalidAccount | No such dealer was found. |
PaymentDealer.CheckPaymentDealerAuthentication.VirtualPosNotFound | There is no virtual pos definition for this dealer. |
PaymentDealer.DoCapture.InvalidAmount | The amount field was entered incorrectly.. |
EX | An unexpected error has occurred |
Example of Failed Result
{
"Data": null,
"ResultCode": "PaymentDealer.CheckPaymentDealerAuthentication.InvalidAccount ",
"ResultMessage": "",
"Exception": null
}