Service Address
/Dealer/GetStatementListMarketPlace
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. |
DealerStatementRequest
Parameter |
Explanation |
StatementStartDate (datetime) |
Statement start date (yyyy-MM-dd ) (optional) |
StatementEndDate (datetime) |
Statement end date (yyyy-MM-dd ) (optional) |
AccountingId (integer) |
Accounting id of the relevant transaction. (optional) |
StatementId (integer) |
Extract id. (optional) |
SubDealerId (integer) |
Sub-dealer id, (required) |
Returns
Parameter |
Explanation |
StatementList (Array) |
DealerStatementId (integer) | Dealer statement id. |
CurrencyId (integer) | Currency id. |
StatementStartDate (datetime) | Statement start date. |
StatementEndDate (datetime) | Statement expiry date |
WillBePaidOn (datetime) | Information on when the payment will be credited to the dealer. |
StatementStatus (integer) | State of the extract. |
SalesCount (integer) | Number of sales. |
SalesTotal (decimal) | Total of sales. |
SalesCommissionTotal (decimal) | Total commission of sales. |
RefundCount (integer) | Number of returns. |
RefundTotal (decimal) | Total of returns. |
RefundCommissionTotal (decimal) | Total return commissions. |
DealerAccountingId (integer) | Dealer accounting id. |
Status (integer) | Situation. |
|
PaymentTrxList (Array) |
DealerPaymentId (integer) | Payment id |
OtherTrxCode (string) | counter transaction number |
CardHolderFullName (string) | Card owner's name and last name |
CardNumberFirstSix (string) | The first 6 digits of the card number |
CardNumberLastFour (string) | Last 4 digits of card number |
PaymentDate (datetime) | Payment date |
Amount (decimal) | Payment total |
RefAmount (decimal) | Refund amount |
CurrencyCode(string) | Currency unit |
InstallmentNumber (integer) | Number of installments |
DealerCommissionAmount (decimal) | Dealer commission amount |
IsThreeD (bool) | 3D Payment? |
Description (string) | Payment description |
PaymentStatus (string) | Payment status (pre-authorization, payment, cancellation, refund, etc.) |
TrxStatus (string) | Process status (pending, successful, failed, etc.) |
Software (string) | The platform from which the payment is sent |
|
SubPaymentList (Array) |
DealerPaymentDealerId (integer) | Subpayment list id. |
DealerId (integer) | Member workplace id. |
Amount (decimal) | Sub-merchant payment amount. |
RefAmount (decimal) | Sub-merchant refund amount. |
DealerCommissionAmount (decimal) | Merchant commission amount |
DealerGroupCommissionAmount (decimal) | Top merchant commission amount |
|
PaymentTrxDetailList (Array) |
DealerPaymentTrxId (integer) | Payment transaction id. |
TrxCode (string) | Transaction code between the bank and Moka. |
TrxDate (datetime) | Transaction date. |
Amount (decimal) | Payment total. |
TrxType (integer) | Type of payment transaction. |
TrxStatus (integer) | Status of the payment transaction. |
PaymentReason (integer) | Payment status (cancellation, refund, regular payment, etc.) |
VoidRefundReason (integer) | Code indicating the reason for the cancellation or refund. |
VirtualPosOrderId (integer) | Virtual pos transaction number. |
ResultMessage (string) | Error message returned from the bank. |
|
SubPaymentTrxList (Array) |
DealerPaymentTrxDealerId (integer) | Subpayment transaction id. |
DealerPaymentDealerId (integer) | Subpayment list id. |
DealerId (integer) | Member workplace id. |
Amount (decimal) | Payment total. |
DealerCommissionAmount (decimal) | Merchant commission amount |
DealerGroupCommissionAmount (decimal) | Top merchant commission amount |
|
Sample Request (JSON)
{
"DealerAuthentication":{
"DealerCode":"XXXX",
"Username":"XXXX",
"Password":"XXXXX",
"CheckKey":"28ba1f316e661ee7a0477a13aa30613da548c94a8098829af9255b04d7e916e3"
},
"DealerStatementRequest":{
"StatementStartDate":"2020-04-01",
"StatementEndDate":"2020-05-05",
"AccountingId":"",
"StatementId":"735",
"SubDealerId":"12345"
}
}
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.
Successful Result Example
{
"Data":{
"IsSuccessful":true,
"ResultCode":"",
"ResultMessage":"",
"ListItemCount":1,
"StatementList":[
{
"DealerStatementId":735,
"CurrencyId":0,
"StatementStartDate":"2020-04-10T00:00:00",
"StatementEndDate":"2020-04-11T00:00:00",
"WillBePaidOn":"2020-04-17T00:00:00",
"StatementStatus":3,
"SalesCount":2,
"SalesTotal":100.00,
"SalesCommissionTotal":4.00,
"RefundCount":0,
"RefundTotal":0.00,
"RefundCommissionTotal":0.00,
"DealerAccountingId":0,
"Status":0,
"PaymentTrxList":[
{
"PaymentDetail":{
"DealerPaymentId":56484,
"OtherTrxCode":"20200411153306",
"CardHolderFullName":"Zeynep HASHAN",
"CardNumberFirstSix":"526955",
"CardNumberLastFour":"4444",
"PaymentDate":"2020-04-11T15:33:06.557",
"Amount":100.00,
"RefAmount":0.00,
"CurrencyCode":"TL",
"InstallmentNumber":0,
"DealerCommissionAmount":3.50,
"DealerGroupCommissionAmount":2.00,
"IsThreeD":false,
"Description":"",
"PaymentStatus":2,
"TrxStatus":1,
"Software":"Possimulation",
"SubPaymentList":[
{
"DealerPaymentDealerId":30228,
"DealerId":167,
"Amount":50.00,
"RefAmount":0.00,
"DealerCommissionAmount":2.00,
"DealerGroupCommissionAmount":1.00
}
]
},
"PaymentTrxDetailList":[
{
"DealerPaymentTrxId":37622,
"TrxCode":"c067dec9-953c-4cb3-ac9f-aba91dab9a67",
"TrxDate":"2020-04-11T15:33:06.613",
"Amount":100.00,
"TrxType":2,
"TrxStatus":1,
"PaymentReason":1,
"VoidRefundReason":0,
"VirtualPosOrderId":"Test-8e6dae7f-7eac-4b13-a619-d879a0a005b8",
"ResultMessage":"",
"SubPaymentTrxList":[
{
"DealerPaymentTrxDealerId":37134,
"DealerPaymentDealerId":30228,
"DealerId":167,
"Amount":50.00,
"DealerCommissionAmount":2.00,
"DealerGroupCommissionAmount":1.00
}
]
}
]
},
{
"PaymentDetail":{
"DealerPaymentId":56485,
"OtherTrxCode":"20200411153308",
"CardHolderFullName":"Zeynep HASHAN",
"CardNumberFirstSix":"526955",
"CardNumberLastFour":"4444",
"PaymentDate":"2020-04-11T15:33:09.117",
"Amount":100.00,
"RefAmount":0.00,
"CurrencyCode":"TL",
"InstallmentNumber":0,
"DealerCommissionAmount":3.50,
"DealerGroupCommissionAmount":2.00,
"IsThreeD":false,
"Description":"",
"PaymentStatus":2,
"TrxStatus":1,
"Software":"Possimulation",
"SubPaymentList":[
{
"DealerPaymentDealerId":30230,
"DealerId":167,
"Amount":50.00,
"RefAmount":0.00,
"DealerCommissionAmount":2.00,
"DealerGroupCommissionAmount":1.00
}
]
},
"PaymentTrxDetailList":[
{
"DealerPaymentTrxId":37623,
"TrxCode":"3ba04827-66fb-45f0-b720-fbeb77340c09",
"TrxDate":"2020-04-11T15:33:09.13",
"Amount":100.00,
"TrxType":2,
"TrxStatus":1,
"PaymentReason":1,
"VoidRefundReason":0,
"VirtualPosOrderId":"Test-dbe8cc01-904a-43e2-8a32a2b1f5feed5e",
"ResultMessage":"",
"SubPaymentTrxList":[
{
"DealerPaymentTrxDealerId":37136,
"DealerPaymentDealerId":30230,
"DealerId":167,
"Amount":50.00,
"DealerCommissionAmount":2.00,
"DealerGroupCommissionAmount":1.00
}
]
}
]
}
]
}
]
},
"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 |
Dealer.CheckDealerAuthentication.InvalidRequest | The CheckKey may be bad, or the object may be bad, or the JSON may be corrupt. |
Dealer.CheckDealerAuthentication.InvalidAccount | No such dealer was found. |
Dealer.GetStatementListMarketPlace.InvalidRequest | The CheckKey may be bad, or the object may be bad, or the JSON may be corrupt. |
PaymentDealer.GetStatementListMarketPlace.DealerNotAuthorized | This dealer has no authorization. | |
Dealer.GetStatementListMarketPlace.SubDealerIdRequired | Sub-dealer id is invalid. |
Dealer.GetStatementListMarketPlace.SubDealerNotFound | Sub-dealer not found. |
Dealer.GetStatementListMarketPlace.InvalidDateFormat | The date format is invalid. |
Dealer.GetStatementListMarketPlace.StatementNotFound | Extract not found. |
Dealer.GetStatementListMarketPlace.InvalidStatementIdOrAccountingId | Statement id or accounting id is invalid. |
EX | An unexpected error has occurred |
Example of Failed Result
{
"Data":null,
"ResultCode":" Dealer.GetStatementListMarketPlace.SubDealerIdRequired",
"ResultMessage":"",
"Exception":null
}