General Information

With MOKA, you can receive payments, send payment requests, card storage services and recurring payment services. Thanks to sample projects, you can integrate Moka.com services much more easily.

While starting

Important informations

Calling Services

Moka services work with JSON – POST method. The service addresses given below for each service are added to the end of the test or prod domains, and the parameters given below are POSTed as JSON objects to the URL, which is also detailed below for each service.


IMPORTANT !!!

Our services only allow the use of TLS 1.2 and higher protocols in accordance with PCI-DSS rules. Please make sure your application POSTs to Moka URL over these protocols. Otherwise, errors such as “Connection will be closed or Connection Closed” will be received.

In .NET Example :

In the Global.asax.cs file,
the following lines should be added inside the protected void Application_Start() method.

ServicePointManager.SecurityProtocol |= SecurityProtocolType.Tls12;

Getting Responses from Services

Moka services return ApiResponse object in response. Flows can be managed by reading the "ResultCode" and "Data" fields of this object.

ApiResponse

Data If the request you sent was sent to Moka correctly, the user information was entered correctly and the entered information did not cause any warning or error on the part of Moka, the Data field will be filled. You can interpret the result of the transaction by using the data returned to you in the data field
ResultCode If the sent data has caused a warning or an error on the Moka side, the Data field will be null and the Moka error code will appear in the ResultCode field.
ResultMessage If there is a special explanation for the error, this field will be filled.
Exception When an unexpected error occurs, EX will be written in the ResultCode field and a description of the error received in the Exception field.