Payment Refund Request

Refunds to be made on or after the next day of payment

Service Address

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
VirtualPosOrderId (string) It is the transaction number information returned as a result of the payment transaction. 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 payment 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) The Amount to be refunded field. A value up to the maximum payment amount for "Partial refund" can be entered in this field. If this field is set to zero or if this field is not sent at all, the full payment is refunded, or if a partial refund has been made before, the entire remaining amount will be refunded. The sum of the amount fields sent in the SubDealer block must be equal to this field.
SubDealer (Array-List)(zorunlu)
DealerId (integer)It is the dealer number of the sub-dealer that will receive the payment..
Amount (decimal)It is the amount that is requested to be refunded from the sub-dealer's payment.

Sample Request (JSON)


{
   "PaymentDealerAuthentication":{
      "DealerCode":"xxx",
      "Username":"xxx",
      "Password":"xxx",
      "CheckKey":"7c662eb7d85e9ec954ba3265d2fff6204e05d878de828ed2cdb3f0627acf4cc8"
   },
   "PaymentDealerRequest":{
      "VirtualPosOrderId":"Test-9bfad942-eb5c-4265-95d9-a8c652b7c29c",
      "OtherTrxCode":"",
      "Amount":4,
      "SubDealer":[
         {
            "DealerId":1772,
            "Amount":1
         },
         {
            "DealerId":1774,
            "Amount":3
         }
      ]
   }
}

Successful Request Result

Successful Result Example


{
   "Data":{
      "IsSuccessful":true,
      "ResultCode":"",
      "ResultMessage":"",
      "RefundRequestId":"1356"
   },
   "ResultCode":"Success",
   "ResultMessage":"",
   "Exception":null
}

Failed Request Result

ResultCodeExplanation
PaymentDealer.DoCreateRefundRequest.InvalidRequest The CheckKey may be bad, or the object may be bad, or the JSON may be corrupt.
PaymentDealer.DoCreateRefundRequest.InvalidAccountNo such dealer was found.
PaymentDealer.DoCreateRefundRequest.OtherTrxCodeOrVirtualPosOrderIdMustGivenIncomplete data sent. OrderId or OtherTrxCode must be entered.
PaymentDealer.DoCreateRefundRequest.InvalidAmountThe value entered in the Amount field should not be greater than the payment amount.
PaymentDealer.DoCreateRefundRequest.PaymentNotFoundA payment record to create a refund request could not be found.
PaymentDealer.DoCreateRefundRequest.OtherTrxCodeAndVirtualPosOrderIdMismatchThe data sent belong to different payments.
PaymentDealer.DoCreateRefundRequest.RefundRequestAlreadyExistThere is a pending refund request for this payment. It must be waited for its completion or the request withdrawn.td>
EX An unexpected error has occurred

Example of Failed Result


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