Non 3D Payment
Service Address
/PaymentDealer/DoDirectPayment
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 | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
CardHolderFullName (string) | Card holder's name | ||||||||||||||||||||
CardNumber (string) | Card number | ||||||||||||||||||||
ExpMonth (string) | Expiry date month information (MM) | ||||||||||||||||||||
ExpYear (string) | Expiry date year information (YYYY) | ||||||||||||||||||||
CvcNumber (string) | card security number | ||||||||||||||||||||
CardToken (string) | If the Card storage feature is used on the Moka, withdrawals can be made by giving the Token of the
Card. If a token has been issued, it is not necessary to provide the card number and other card
information (expiry date, cvc). Note : Even if there is a 3D transaction obligation when sending a card number in workplace authorizations, if a NonSecure (Non-3D) transaction is desired while making a payment with Token, Non3D payment service can also be used by requesting this parametric authorization from Moka. |
||||||||||||||||||||
Amount (decimal) | Payment amount (The Kurus part is written with a dot. For example: 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 12 must be sent for Installment. | ||||||||||||||||||||
ClientIP (string) | IP information of the computer running the application (desktop/web) from which the card number is obtained | ||||||||||||||||||||
OtherTrxCode (string) | You can submit your own Unique Transaction Code in this field for reconciliation. (Can also be sent blank). Note: You can find out the payment status by using this code while getting the dealer payment detail list. | ||||||||||||||||||||
SubMerchantName (string) (optional) | Name you want to appear on statement – Moka must be notified in advance | ||||||||||||||||||||
IsPoolPayment (tinyint) | Pool payment ? 0 : No - The amount withdrawn from the card is credited to the dealer's account the next day or later, according to the agreement between Moka and the dealer. 1 : Yes - The money will be withdrawn from the credit card but kept in the pool. The dealer will approve the payment after the customer receives the service or product, and the payment for this transaction will be reflected on the dealer's statement after approval. Until the dealer approves the pool payment, this payment is not included in the statement. Set this field to 1 to send a payment in the pool system. |
||||||||||||||||||||
IsTokenized (tinyint) | Will the card entered for payment be stored in the Moka system? (The dealer must be receiving card
storage service to be able to store cards) 0 : Card will not be stored 1 : Card will be kept |
||||||||||||||||||||
IntegratorId (tinyint) (optional) | ID of the System Integrator Company that integrates Moka into ready-made eCommerce packages – (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) | ||||||||||||||||||||
Description (string)(optional) | Description field. If you want to write a description about the payment, it can be written in this field. (Up to 200 characters can be written.) | ||||||||||||||||||||
IsPreAuth (tinyint) | Pre-authorization process ? 0 : No - Direct Capture Process 1 : Yes - Pre-authorization Process (Must be converted to payment with DoCapture service after a while) |
||||||||||||||||||||
BuyerInformation (Array)(optional) | These are the fields related to the customer who buys a product/service from our dealer. Although it
is not mandatory to send these fields, sharing them with Moka is in the interests of both our dealer
and Moka in case of future payment related problems.
|
||||||||||||||||||||
BasketProduct (Array)(optional) |
|
||||||||||||||||||||
CustomerInformation (Array)(optional) (If the card is desired to be stored, the information of the customer to which the card will be stored should be sent in this block.) | If card information is also desired to be stored during payment and the dealer's card storage
service is activated by Moka, then this information block can be sent to create a customer and add
the card number used for payment to this customer.
|
Sample Request (JSON)
{
"PaymentDealerAuthentication":{
"DealerCode":"xxx",
"Username":"xxx",
"Password":"xxx",
"CheckKey":"28ba1f316e661ee7a0477a13aa30613da548c94a8098829af9255b04d7e916e3"
},
"PaymentDealerRequest":{
"CardHolderFullName":"Ali Yılmaz",
"CardNumber":"5555666677778888",
"ExpMonth":"09",
"ExpYear":"2024",
"CvcNumber":"123",
"CardToken":"",
"Amount":0.01,
"Currency":"TL",
"InstallmentNumber":1,
"ClientIP":"192.168.1.116",
"OtherTrxCode":"20210114170108",
"SubMerchantName":"",
"IsPoolPayment":0,
"IsTokenized":0,
"IntegratorId":0,
"Software":"Possimulation",
"Description":"",
"IsPreAuth":0,
"BuyerInformation":{
"BuyerFullName":"Ali Yılmaz",
"BuyerGsmNumber":"5551110022",
"BuyerEmail":"aliyilmaz@xyz.com",
"BuyerAddress":"Tasdelen / Çekmeköy"
},
"CustomerInformation":{
"DealerCustomerId":"",
"CustomerCode":"1234",
"FirstName":"Ali",
"LastName":"Yılmaz",
"Gender":"1",
"BirthDate":"",
"GsmNumber":"",
"Email":"aliyilmaz@xyz.com",
"Address":"",
"CardName":"Maximum kartım"
}
}
}
Successful Request Result
If the sent request data has been processed successfully in Moka, "Success" information is written in the "ResultCode" field of the return object . In the "Data" field, the result of the transaction returned from the bank is found. The status of the operation is checked by checking the "IsSuccessful" (true/false) field in "Data" . If this field returns false, it can be seen why the operation failed on the virtual pos by checking the ResultCode and ResultMessage fields in the same object. In case of a successful transaction from the bank, the code from the VirtualPosOrderId field in the same object should be stored. Cancellation, refund or pool payment confirmation transactions
Successful Result Example
{
"Data": {
"IsSuccessful": true,
"ResultCode": "",
"ResultMessage": "",
"VirtualPosOrderId": "ORDER-17131QMlH04026199"
},
"ResultCode": "Success",
"ResultMessage": "",
"Exception": null
}
Failed Request Result
If the sent request data could not be processed in Moka streams, the "ResultCode" field of the return object contains one of the error codes in the table below.
When an unexpected software error occurs, EX is written in the "ResultCode" field and the error message (Exception) is displayed in the "ResultMessage" field
In both cases, the "Data" object arrives as null.
ResultCode | Explanation |
---|---|
PaymentDealer.CheckPaymentDealerAuthentication.InvalidRequest | The CheckKey may be bad, or the object may be bad, or the JSON may be corrupt |
PaymentDealer.CheckPaymentDealerAuthentication.InvalidAccount | No such dealer was found, Dealer code, dealer username and/or password were entered incorrectly. |
PaymentDealer.CheckPaymentDealerAuthentication.VirtualPosNotFound | There is no virtual pos definition for this dealer. |
PaymentDealer.CheckDealerPaymentLimits.DailyDealerLimitExceeded | Any of the daily limits defined for the dealer have been exceeded. |
PaymentDealer.CheckDealerPaymentLimits.DailyCardLimitExceeded | No more transactions can be made using this card during the day.. |
PaymentDealer.CheckCardInfo.InvalidCardInfo | There is an error in the card information |
PaymentDealer.DoDirectPayment.ThreeDRequired | There is an obligation to send 3d payment for the dealer, Non-3D payment cannot be sent. |
PaymentDealer.DoDirectPayment.InstallmentNotAvailableForForeignCurrencyTransaction | Installments cannot be made in foreign currency. |
PaymentDealer.DoDirectPayment.ThisInstallmentNumberNotAvailableForDealer | This number of installments cannot be made for this dealer. |
PaymentDealer.DoDirectPayment.InvalidInstallmentNumber | The number of installments is between 2 and 12. |
PaymentDealer.DoDirectPayment.ThisInstallmentNumberNotAvailableForVirtualPos | Virtual Pos does not allow this number of installments. |
EX | An unexpected error has occurred |
Example of Failed Result
{
"Data": null,
"ResultCode": "PaymentDealer.CheckPaymentDealerAuthentication.VirtualPosNotFound ",
"ResultMessage": "",
"Exception": null
}