Mobile Payment with 3D Secure

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
PaymentType (string) Bank Code (64 for İşbank)
Amount (decimal) Payment amount (Kurus part is written with a dot, Ex: 27.50)
Currency (string) Currency unit. Optional field, if not sent at all or empty, default is TL. Other values: USD, EUR, GBP
InstallmentNumber (integer) Number of Installments. It is an optional field, if it is not sent at all, if it is sent blank, if 0 or 1 is sent, it means Advance sale. A value between 2 and 9 must be sent for Installment.
ClientIP (string) It is the IP information of the computer running the application (desktop/web) from which the card number is obtained.
RedirectURL (string) As a result of the 3D transaction, the dealer web page where the successful or unsuccessful transaction result is returned and the user is directed. While giving this URL, if you write your own transaction ID as a parameter at the end, you will be able to determine the result of your transaction. Example: https://www.mysite.com/PayResult?MyTrxId=123456
RedirectType (integer) It is an optional field. Its default value is 0 (zero). The result of the payment process redirects to the home page on the website that calls the service. If this service is called from the IFrame and the result is to be redirected to the IFrame, 1 must be entered in this field.
OtherTrxCode (string) You can submit your own Unique Transaction Code in this field for reconciliation. Required field. Note: You can learn the payment status by using this code while obtaining the dealer payment detail list.
IsPoolPayment (tinyint) Pool Payment? 0: No – The amount withdrawn from the card is credited to the account of the merchant the next day or later, according to the agreement between Moka and the merchant. 1: Yes – The money is withdrawn from the credit card but kept in the pool. The merchant will approve the payment after the customer receives the service or product, and the payment for this transaction will be reflected on the member's statement after approval. Until the merchant approves the pool payment, this payment is not included in the statement. This field must be 1 to send a payment in the pool system.
IntegratorId (tinyint) ID of the System Integrator Company that integrates Moka into ready-made E-Commerce packages (optional) – (If you are not an integrator company, do not send this field!)
Software (string) The name of the E-Commerce package or software that you call this service integrated with the Moka payment system. (Max 30 characters)
SubMerchantName (string) Name you want to appear on statement (optional) – Moka must be notified in advance
Description (string) Description field (optional). If you want to write a description about the payment, it can be written in this field. (Up to 200 characters can be written.)
BuyerInformation (Array)(optional) These are the fields related to the customer who buys products and/or services from the member business. Although it is not mandatory to send these fields, sharing them with Moka is in the interest of both the member workplace and Moka in case of future payment related problems.

BuyerFullName (string) Optional field. Name and surname of the recipient.
BuyerEmail (string) Optional field. Recipient's e-mail address.
BuyerGsmNumber (string) Optional field. It is the mobile phone number of the recipient. It must be entered as 10 digits, without spaces.
BuyerAddress (string) Optional field. It is the address of the recipient.

Sample Request (JSON)


{
   "PaymentDealerAuthentication":{
      "DealerCode":"XXX",
      "Username":"XXX",
      "Password":"XXX",
      "CheckKey":"28ba1f316e661ee7a0477a13aa30613da548c94a8098829af9255b04d7e916e3"
   },
   "PaymentDealerRequest":{
      "PaymentType":"64",
      "Amount":0.01,
      "Currency":"TL",
      "InstallmentNumber":1,
      "ClientIP":"192.168.1.116",
      "OtherTrxCode":"MOB-20201217152028",
      "SubMerchantName":"",
      "IsPoolPayment":0,
      "IntegratorId":0,
      "Software":"Possimulation",
      "Description":"",
      "RedirectUrl":"https://service.TestMoka.com/PaymentDealerThreeD?MyTrxCode=20201217152028",
      "RedirectType":0,
      "BuyerInformation":{
         "BuyerFullName":"",
         "BuyerGsmNumber":"",
         "BuyerEmail":"",
         "BuyerAddress":"Tasdelen / Çekmeköy"
      }
   }
}

Successful Request Result

IMPORTANT NOTE

Successful Result Example


{
	"Data":{
      "Url":"https://service.testmoka.com/PaymentDealerThreeDMobileProcess?threeDTrxCode=ee453c30-488f-4cdc-b674-387df6a0eda7&RedirectType=0",
      "CodeForHash":"9FDFBDFC-42C5-417E-AA93-E4D9D5312AAC"
	},
	"ResultCode":"Success",
	"ResultMessage":"",
	"Exception":null
}

Failed Request Result

ResultCode Explanation
PaymentDealer.DoDirectPayment3dMobileRequest.IpAddressNotAllowed The merchant does not have permission to make transactions with the IP address sent.
PaymentDealer.DoDirectPayment3dMobileRequest.VirtualPosCommissionRateNotFound The commission rate of the virtual pos is not defined.
PaymentDealer.DoDirectPayment3dMobileRequest.VirtualPosNotAvailable Virtual POS could not be selected for this operation.
PaymentDealer.DoDirectPayment3dMobileRequest.InstallmentNotAvailableForForeignCurrencyTransaction No installment transactions can be made with foreign currencies.
PaymentDealer.DoDirectPayment3dMobileRequest.ForeignCurrencyNotAvailableForThisDealer This member business is not authorized to take transactions in foreign currency.
PaymentDealer.DoDirectPayment3dMobileRequest.PoolPaymentNotAvailableForDealer This merchant is not authorized to receive pooled payment transactions.
PaymentDealer.DoDirectPayment3dMobileRequest.PoolPaymentRequiredForDealer It is obligatory for this member business to make transactions with pooled payment.
PaymentDealer.DoDirectPayment3dMobileRequest.ChannelPermissionNotAvailable The merchant has no authority for the payment channel through which the transaction takes place.
PaymentDealer.DoDirectPayment3dMobileRequest.InvalidInstallmentNumber Invalid number of installments
PaymentDealer.DoDirectPayment3dMobileRequest.NoAllowedToUseThisWebService The member business is not authorized to use this service.
PaymentDealer.DoDirectPayment3dMobileRequest.AmountRequired The Amount field must be submitted.
PaymentDealer.DoDirectPayment3dMobileRequest.OtherTrxCodeRequired The OtherTrxCode field must be sent.
PaymentDealer.DoDirectPayment3dMobileRequest.RedirectUrlRequired The RedirecUrl field is required to be sent.
PaymentDealer.DoDirectPayment3dMobileRequest.PaymentTypeRequired The PaymentType field is required to be submitted.
PaymentDealer.DoDirectPayment3dMobileRequest.InvalidPaymentType Invalid bank code
PaymentDealer.DoDirectPayment3dMobileRequest.InvalidCurrencyCode Invalid currency
PaymentDealer.DoDirectPayment3dMobileRequest.AgreementDateNotFound There is no contract record of the member workplace.
PaymentDealer.DoDirectPayment3dMobileRequest.RedirectUrlCannotContainOtherTrxCode The RedirectUrl field must contain OtherTrxCode.
EX An unexpected error has occurred

Example of Failed Result


{
   "Data":null,
   "ResultCode":"PaymentDealer.DoDirectPayment3dMobileRequest.VirtualPosCommissionRateNotFound",
   "ResultMessage":"",
   "Exception":null
}

3D Secure Mobile Transaction Flow


image

Payment Transaction Error Codes (Errors Received from Bank)


ResultCode ResultMessage
000 General Error
001 Cardholder Confirmation Failed
002 Insufficient Limit
003 Credit Card Number Not in Valid Format
004 General Disclaimer
005 Transaction Not Open to Card Holder
006 Card Expiry Date Incorrect
007 Invalid Transaction
008 Unable to Connect to Bank
009 Undefined Error Code
010 Bank SSL Error
011 Call the Bank for Manual Approval
012 Card Information Incorrect - Card Number or CVV2
013 Cards Except Visa MC Do Not Support 3D Secure
014 Invalid Account Number
015 Invalid CVV
016 No Approval Mechanism Available
017 System failure
018 Stolen Card
019 Lost Card
020 Restricted Card
021 Time out
022 Invalid Workplace
023 Fake Confirmation
024 3D Approval Received But Money Couldn't Be Withdrawn From Card
025 3D Confirmation Error
026 Card Holder is Not a Bank or Card 3D-Secure Member