Get Payment Detail List

Transactions of a Single Master Payment Record

Service Address

What Is It Used For?

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

Parameter Explanation
PaymentId (string) The Id of the payment record in the Moka system. It is a Unique ID that appears in the list returned to you with the reseller payment list service. In order to query the details of the payment, you must either provide this ID or your own Unique ID (OtherTrxCode).
OtherTrxCode (string) When sending payment, if you have sent your own system's Unique Transaction Number of this transaction to Moka, you can make a payment detail query using this field. In order to query the details of the payment, you must provide either this field or the DealerPaymentId field.

Sample Request (JSON)


{
   "PaymentDealerAuthentication":{
      "DealerCode":"xxx",
      "Username":" xxx ",
      "Password":" xxx ",
      "CheckKey":"91e9aa3978e33a8e5867f6ed8fbe2a8a6117db0a2d1f17164801348e68306c07"
   },
   "PaymentDealerRequest":{
      "PaymentId":"1170",
      "OtherTrxCode":""
   }
}

Successful Request Result

The Payment master record statuses returned with the PaymentDetail Object are as follows;

PaymentStatus TrxStatus Explanation
0 - Standby 0 - Standby Awaiting payment confirmation
1 - Pre-Provision 1 - Successful Pre-Provision successful
1 - Pre-Provision 2 - Failed Pre-Provision failed
2 - Payment 1 - Successful Payment successful
2 - Payment 2 - Failed Payment failed
3 - Cancel 1 - Successful Cancellation successful
4 - Full Refund 1 - Successful Return successful

Payment detail record statuses returned in PaymentTrxDetailList Array are as follows;

TrxType TrxStatus Explanation
1 1 Pre-Provision successful
1 2 Pre-Provision failed
2 1 Payment successful
2 2 Payment failed
3 1 Cancellation successful
3 2 Cancel failed
4 1 Return successful
4 2 Return failed
PaymentReason 0 : Not a payment transaction (cancellation or refund)
1 : Payment transaction
VoidRefundReason Cancellation is the field that shows why the refund was made
0 : Cancellation is not a refund process (This code is meaningless because it is a payment process)
2 : External Manual cancellation / refund process (Cancellation via Pos.moka.com or api)
3 : Internal Manual cancellation / refund process (operation made from Moka administration panel)

If the full payment is refunded, it changes to PaymentStatus = 4 in the master payment record. If a partial refund is made, the status of the payment remains PaymentStatus = 2.


The Amount field in the Trx records for this main payment is defined according to the type of the Trx record. If TrxType = 2, the Amount field displays the payment amount, as it is a payment detail. If TxType = 4, the Amount field displays the refund amount because it is a refund detail.


Bu ana ödemeye ilişkin Trx kayıtlarındaki Amount alanı ise, Trx kaydının tipine göre anlamlandırılır. TrxType = 2 ise ödeme detayı olduğu için Amount alanı ödeme tutarını gösterir. TxType = 4 ise iade detayı olduğu için Amount alanı iade tutarını gösterir.


It is an example that shows the relationship between the main payment record and the detail records: There may be one or more detail records (Transaction records) based on a single master payment record. When a transaction record is added, the status of the master payment record may change or remain the same.

image

As can be seen in this example, on January 15, a payment of 100 liras was sent in 3D and a successful result was obtained. Then, on January 18, a refund of 30 liras was attempted, but was unsuccessful. Then the same return was tried again and was successful. Since there was a partial refund, the status of the main payment record remained as "Successful Payment". Then, on January 22, another successful portion of 20 liras was returned. And finally, on January 25, all the remaining money was returned. And the status of the main payment record has changed to “Successful Full Refund”.


Successful Result Example


{
   "Data":{
      "IsSuccessful":true,
      "ResultCode":"00",
      "ResultMessage":"",
      "PaymentDetail":{
         "DealerPaymentId":27405,
         "OtherTrxCode":"",
         "CardHolderFullName":"Ahmet Yılmaz",
         "CardNumberFirstSix":"554960",
         "CardNumberLastFour":"5523",
         "PaymentDate":"2017-02-28T14:42:17.26",
         "Amount":20.10,
         "RefAmount":5.10,
         "CurrencyCode":"TL",
         "InstallmentNumber":0,
         "DealerCommissionAmount":0.50,
         "IsThreeD":false,
         "Description":"Ödeme açıklaması",
         "PaymentStatus":2,
         "TrxStatus":1
      },
      "ListItemCount":2,
      "PaymentTrxDetailList":[
         {
            "DealerPaymentTrxId":2971,
            "DealerPaymentId":27405,
            "TrxCode":"26ba712e-6381-4291-8c59-702c13b30d4d",
            "TrxDate":"2017-02-28T14:42:17.837",
            "Amount":20.10,
            "TrxType":2,
            "TrxStatus":1,
            "PaymentReason":1,
            "VoidRefundReason":0,
            "VirtualPosOrderId":" ORDER-17060RYOG07011948",
            "ResultMessage":""
         },
         {
            "DealerPaymentTrxId":2982,
            "DealerPaymentId":27405,
            "TrxCode":"32c19f0f-4853-4a0d-bf7c-fbc687a826a7",
            "TrxDate":"2017-02-28T14:44:32.26",
            "Amount":5.10,
            "TrxType":4,
            "TrxStatus":1,
            "PaymentReason":0,
            "VoidRefundReason":2,
            "VirtualPosOrderId":" ORDER-17060RYOG07011948",
            "ResultMessage":""
         }
      ]
   },
   "ResultCode":"Success",
   "ResultMessage":"",
   "Exception":null
}

Failed Request Result

ResultCodeExplanation
PaymentDealer.CheckPaymentDealerAuthentication.InvalidRequestThe CheckKey may be bad, or the object may be bad, or the JSON may be corrupt.
PaymentDealer.CheckPaymentDealerAuthentication.InvalidAccountNo such dealer was found.
PaymentDealer.GetDealerPaymentTrxDetailList.PaymentIdErrorIf Payment Id is blank, 0 or sent in wrong format.
EXAn unexpected error has occurred

Example of Failed Result


{
	"Data": null,
	"ResultCode": "PaymentDealer.CheckPaymentDealerAuthentication.InvalidAccount ",
	"ResultMessage": "",
	"Exception": null
}