Calculating the Amount to be Withdrawn from the Card

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
BinNumber (string) First 6 digits of Credit Card Number
Currency (decimal) Currency (If this parameter is not sent, it will receive 'TL' by default.)
OrderAmount (decimal) Basket Amount
InstallmentNumber (decimal) Number of Installments
GroupRevenueRate (decimal) Group Income Ratio
GroupRevenueAmount (decimal) Group Income Amount
IsThreeD (bool) 0: Payment without 3D, 1: Payment in 3D

Returns

ResultCodeExplanation
PaymentAmount (decimal)Amount to be Collected from Card
DealerDepositAmount (decimal)Basket Amount
DealerCommissionRate (decimal)Commission Rate Given to Sub-Dealer
DealerCommissionAmount (decimal)Sub-Dealer Commission Amount
DealerCommissionFixedAmount (decimal)Sub-Dealer Commission Fixed Amount
DealerGroupCommissionRate (decimal)Commission Rate Given to Top Dealer
DealerGroupCommissionAmount (decimal)Top Dealer Commission Amount
DealerGroupCommissionFixedAmount (decimal)Top Dealer Commission Fixed Amount
GroupRevenueRate (decimal)Group Income Ratio
GroupRevenueAmount (decimal)Group Income Amount
BankCard (Array)
BankName (string)The bank that owns the bin number (Issuer Bank) – Listed below
BankCode (string)Bank's national code – Available in the list below(*)
BinNumber (string)Bin number given to the service
CardName (string)If the card has a special name, it is written in this field.
CardType (string)Returns MASTER, VISA, MAESTRO, AMEX, TROY
CreditType (string)Returns as CreditCard or DebitCard
CardLogo (string)The program logo of the card rotates (Bonus logo, Axess logo etc.)
CardTemplate (string))The image of the card rotates
ProductCatagory (string))Commercial or Personal information of the card returns
GroupName (string)The program name of the card returns (BONUS, AXESS, WORLD, CARDFINANS etc.)

Sample Request (JSON)


{
   "PaymentDealerAuthentication":{
      "DealerCode":"XXXX",
      "Username":"XXXX",
      "Password":"XXXX",
      "CheckKey":"28ba1f316e661ee7a0477a13aa30613da548c94a8098829af9255b04d7e916e3"
   },
   "PaymentDealerRequest":{
      "BinNumber":"526911",
      "Currency":"TL",
      "OrderAmount":100,
      "InstallmentNumber":1,
      "GroupRevenueRate":5,
      "GroupRevenueAmount":"",
      "IsThreeD":1
   }
}

Successful Request Result

Successful Result Example


{
   "Data":{
      "PaymentAmount":101.56,
      "DealerDepositAmount":95.0,
      "DealerCommissionRate":6.46,
      "DealerCommissionAmount":6.56,
      "DealerCommissionFixedAmount":0.0,
      "DealerGroupCommissionRate":1.54,
      "DealerGroupCommissionAmount":1.56,
      "DealerGroupCommissionFixedAmount":0.00,
      "GroupRevenueRate":5.0,
      "GroupRevenueAmount":5.0,
      "BankCard":{
         "BankName":"FİNANSBANK",
         "BankCode":"111",
         "BinNumber":"526911",
         "CardName":"",
         "CardType":"MASTER",
         "CreditType":"CreditCard",
         "CardLogo":"",
         "CardTemplate":"",
         "ProductCategory":"Bireysel",
         "GroupName":""
      }
   },
   "ResultCode":"Success",
   "ResultMessage":"",
   "Exception":null
}

Failed Request Result

ResultCodeExplanation
PaymentDealer.DoCalcPaymentAmount.InvalidRequest The CheckKey may be bad, or the object may be bad, or the JSON may be corrupt.
PaymentDealer.DoCalcPaymentAmount.RequiredOrderAmountCart amount required
PaymentDealer.DoCalcPaymentAmount.InvalidCurrencyCodeCurrency required
PaymentDealer.DoCalcPaymentAmount.InvalidInstallmentNumberThe installment number is invalid
PaymentDealer.DoCalcPaymentAmount.VirtualPosCommissionRateNotFoundVirtual pos commission rate could not be found.
PaymentDealer.DoCalcPaymentAmount.InstallmentNotAvailableForForeignCurrencyTransactionInstallment transaction is not valid for foreign currency.
PaymentDealer.DoCalcPaymentAmount.DealerDoNotBinNumberInquiryAllowedThe dealer does not have permission to query Bin number.
PaymentDealer.DoCalcPaymentAmount.BinNumberMustGivenThe bin number must be given.
PaymentDealer.DoCalcPaymentAmount.BothGroupRevenueRateAndGroupRevenueAmountMustBeZeroBoth the group income ratio and the group income amount must be 0.
EX An unexpected error has occurred

Example of Failed Result


{
   "Data":null,
   "ResultCode":"PaymentDealer.DoCalcPaymentAmount.BothGroupRevenueRateAndGroupRevenueAmountMustBeZero",
   "ResultMessage":"",
   "Exception":null
}

Explanation

ISSUER BANK LIST


image