API Products of the Mir payment system

Dispute API documentation

BpEngineApi Service

The BpEngineApi service provides methods for working with case samples: initiation, execution, obtaining execution options.

To execute the BpEngineApi service methods, transfer the access token parameter (X-Authorization).

GetBpItem Method

To get actions available for a case sample, call the GetBpItem method.

Method address: /webapi/v1/BpEngineApi/GetBpItem/{id}
Request type: post

REQUEST DETAILS
Key Data type Description
id* integer Case ID
getFilesInBody boolean Get files from a request
X-Authorization string  
RESPONSE DETAILS 200
Key Data type Description
bpItem BpItem Detailed case information
success boolean Action result
errorMessage string Error text

An example of HTTP request

JSON
POST http://<Имя сервера Диспут+>/webapi/v1/BpEngineApi/GetBpItem/<bpItemId> HTTP/1.1
 
Host: <Имя сервера Диспут+>
Connection: keep-alive
Content-Length: 0
Accept: application/json
Accept-Encoding: gzip, deflate
Accept-Language: ru-RU,ru;q=0.8,en-US;q=0.6,en;q=0.4
X-Authorization: Bearer <значение маркера доступа>

An example of HTTP response

JSON
HTTP/1.1 200 OK
Cache-Control: no-cache
Pragma: no-cache
Content-Length: 226
Content-Type: application/json; charset=utf-8
Expires: -1
Server: Microsoft-IIS/8.5
X-AspNet-Version: 4.0.30319
X-Powered-By: ASP.NET
Date: Wed, 25 Apr 2018 11:13:53 GMT
{ 
   "bpItem":{ 
      "cardPrefix":"222222",
      "cardSuffix":"4676",
      "startTrxProperty":[ 
         { 
            "date":"10.05.2018",
            "amount":1003.11,
            "amountAndCurrency":"1,003.11 RUB",
            "cardAcceptorName":"Name_OgGlHezCWzE",
            "arn":"22233448128504531187294",
            "initiatorName":"Тестовый банк",
            "respondentName":"Acq ТЕСТ (АО)",
            "operatorRoleName":"Эквайрер",
            "operatorInitiator":false,
            "operationType":"Оплата",
            "transactionDate":"09.05.2018"
         }
      ],
      "acquirerBin":"223344",
      "issuerBin":"22222222",
      "stages":[ 
         { 
            "id":194,
            "stageId":187,
            "code":"ZIP_s_Start",
            "name":"Запуск ЗИП",
            "description":"Получатель должен ответить на ЗИП",
            "longDescription":"Получатель должен ответить на ЗИП",
            "isActive":true,
            "fields":[ 
               { 
                  "id":"4120",
                  "baseTypeCode":"Money",
                  "code":"ZIP_f_DisputeAmount",
                  "name":"Сумма диспута",
                  "value":"1,003.11 RUB",
                  "jsonValue":"{\"amount\":1003.11,\"currency\":{\"id\":1,\"numericCode\":\"643\",\"code\":\"RUB\",\"displayValue\":\"Российский рубль\",\"currencyExponent\":2}}",
                  "isLinkedWithTrxField":false,
                  "fieldType":"text",
                  "readOnly":true,
                  "visible":true,
                  "documentsInfo":[ 
                  ]
               },
               { 
                  "id":"4121",
                  "baseTypeCode":"RadioButton",
                  "code":"ZIP_f_RequestReason",
                  "name":"Причина запроса",
                  "value":"Товар не получен",
                  "jsonValue":"",
                  "isLinkedWithTrxField":false,
                  "fieldType":"select",
                  "readOnly":true,
                  "visible":true,
                  "documentsInfo":[ 
                  ]
               },
               { 
                  "id":"4122",
                  "baseTypeCode":"Select",
                  "code":"ZIP_f_PurchaseType",
                  "name":"Тип покупки",
                  "value":"Услуга/Работы",
                  "jsonValue":"",
                  "isLinkedWithTrxField":false,
                  "fieldType":"select",
                  "readOnly":true,
                  "visible":true,
                  "documentsInfo":[ 
                  ],
                  "description":"Укажите тип покупки"
               },
               { 
                  "id":"4123",
                  "baseTypeCode":"Date",
                  "code":"ZIP_f_ExpectedDeliveryDate",
                  "name":"Ожидаемая дата доставки товаров",
                  "value":"",
                  "jsonValue":"",
                  "isLinkedWithTrxField":false,
                  "fieldType":"text",
                  "readOnly":true,
                  "visible":true,
                  "documentsInfo":[ 
                  ],
                  "description":"Укажите ожидаемую дату доставки товаров.\n  Значение не может быть больше текущей даты и меньше даты совершения операции"
               },
               { 
                  "id":"4124",
                  "baseTypeCode":"Date",
                  "code":"ZIP_f_ExpectedServiceDate",
                  "name":"Ожидаемая дата оказания услуги/выполнения работ",
                  "value":"14.05.2018",
                  "jsonValue":"",
                  "isLinkedWithTrxField":false,
                  "fieldType":"text",
                  "readOnly":true,
                  "visible":true,
                  "documentsInfo":[ 
                  ],
                  "description":"Укажите ожидаемую дату оказания услуги/выполнения работ.\n  Значение не может быть больше текущей даты и меньше даты совершения операции"
               },
               { 
                  "id":"4267",
                  "baseTypeCode":"Files",
                  "code":"f_Docs",
                  "name":"Документы",
                  "jsonValue":"",
                  "isLinkedWithTrxField":false,
                  "fieldType":"text",
                  "readOnly":true,
                  "visible":true,
                  "documentsInfo":[ 
                  ]
               },
               { 
                  "id":"4115",
                  "baseTypeCode":"Text",
                  "code":"ZIP_f_Comment",
                  "name":"Комментарий",
                  "jsonValue":"",
                  "isLinkedWithTrxField":false,
                  "fieldType":"text",
                  "readOnly":true,
                  "controlWidth":"300px",
                  "maxLength":500,
                  "visible":true,
                  "documentsInfo":[ 
                  ]
               }
            ],
            "isAutoAction":false,
            "stageCreateDate":"2018-05-14T10:36:19",
            "stageCloseDate":"2018-05-29T10:36:19",
            "startDate":"2018-05-14T10:36:19",
            "isNextStage":false,
            "userId":19,
            "isFinal":false
         }
      ],
      "participantFields":[ 
         { 
            "baseTypeCode":"String",
            "code":"pf_1",
            "name":"IsUnread",
            "value":"false",
            "isLinkedWithTrxField":false,
            "readOnly":false,
            "visible":false
         }
      ],
      "acquirerInitiator":false,
      "bpName":"ЗИП",
      "bpVersionId":28,
      "observerList":[ 
      ],
      "isCurentUserObserver":false,
      "userName":"aa_FIO",
      "stageDescription":"Получатель должен ответить на ЗИП",
      "amount":1003.11,
      "id":109,
      "paymentSystem":"МИР",
      "dateCreated":"2018-05-14T10:36:19",
      "bpCode":"ZIP",
      "code":"ZIP-18-108"
   },
   "success":true
}

Data types

BpItem

Code Data types Description
trxId string  
cardPrefix string  
cardSuffix string  
startTrxProperty array of BpStartTrxProperty  
stages array of BpItemStage  
fields array of BpField  
participantFields array of BpField  
chatItems array of BpChatItemDto  
logItems array of BpItemHistoryEvent  
actionCode string  
bpName string  
bpVersionId integer  
observerList array of string  
isCurentUserObserver boolean  
userName string  
stageDescription string  
lastActionId string  
amount number  
isReversalExists boolean  
id integer  
paymentSystem string of paymentSystem  
dateCreated string  
bpCode string  
code string  

BpStartTrxProperty

Code Data types Description
id integer  
code string  
cardNumber string  
date string  
amount number  
amountAndCurrency string  
cardAcceptorName string  
arn string  
initiatorName string  
respondentName string  
operatorRoleName string  
operatorInitiator boolean  
operationType string  
transactionDate string  
initiatorContacts array of BankContact  
respondentContacts array of BankContact  
acquirerBin string  
issuerBin string  

BankContact

Code Data types Description
id integer  
bankId string  
bic string  
direction string  
phone string  
email string  

BpItemStage

Code Data types Description
id integer  
stageId integer  
code string  
name string  
description string  
longDescription string  
imgUrl string  
isActive boolean  
autoActionDate string  
fields array of BpField  
actions array of BpAction  
isAutoAction boolean  
stageCreateDate string  
stageCloseDate string  
startDate string  
isNextStage boolean  
userId integer  
userName string  
isFinal boolean  

BpField

Code Data types Description
baseTypeCode string  
code string  
name string  
options array of KeyValuePair[String,String]  
value string  
valueCode string  
jsonValue string  
isLinkedWithTrxField boolean  
valueText string  
fieldType string  
readOnly boolean  
jsValidator string  
controlWidth string  
minLength integer  
maxLength integer  
mask string  
visible boolean  
documents array of FileContent  
documentsIndex array of integer  
documentsInfo array of Document  
description string  
mandatoryDescription string  
cssClass string  

KeyValuePair[String,String]

Code Data types Description
key string  
value string  

FileContent

Code Data types Description
id integer  
content string  
fileName string  

Document

Code Data types Description
id string  
creationDate string  
creator string  
name string  

BpAction

Code Data types Description
id integer  
code string  
name string  
headerName string  
stageToId integer  
fields array of BpActionField  
buttonColor string  
buttonIcon string  
confirmationType string of confirmationType  
isGroupAction boolean  
groupHeaderName string  
groupLongDescription string  
canUndo boolean  
typeCode string  

BpActionField

Code Data types Description
stageCode string  
fieldCode string  
hideOnGroupAction boolean  

BpChatItemDto

Code Data types Description
files array of BpChatItemFileDto  
id integer  
bpItemId integer  
dateCreate string  
text string  
authorType string of authorType  
userId integer  
user User  

BpChatItemFileDto

Code Data types Description
id integer  
filename string  

User

Code Data types Description
id integer  
trackerCode string  
login string  
name string  
eMail string  
participantId integer  
participant Participant  
isActive boolean  
password string  
userType string of userType  
roles array of UserRole  
restriction string of restriction  
isAdmin boolean  
isArbiter boolean  
isParticipantManagement boolean  
isNspkUser boolean  
isDisputeUser boolean  
langCode string  
changePasswordDate string  
isDelete boolean  
attemptCount integer  

Participant

Code Data types Description
id integer  
name string  
nameEn string  
trackerCode string  
bankId string  
bank Bank  
isOpeParticipant boolean  
isAdjustmentDenied boolean  
langCode string  
isForeign boolean  

Bank

Code Data types Description
id string  
fullName string  
name string  
transName string  
isSanctioned boolean  
bins array of BankBin  
edms array of BankEdms  
contacts array of BankContact  

BankBin

Code Data types Description
id integer  
bin string  
memberBankId string  
ownerBankId string  
ownerBank Bank  
paymentSystem string of paymentSystem  
sponsorBankId string  
sponsorBank Bank  
processorBankId string  
processorBank Bank  
activityType string of activityType  
productCode string  
isDeleted boolean  
binDelegate array of BinDelegate  

BinDelegate

Code Data types Description
id integer  
binId integer  
bankId string  
delegateForSystem string of delegateForSystem  
accessType string of accessType  
bin BankBin  
bank Bank  

BankEdms

Code Data types Description
id integer  
bankId string  
edmsId string  
isMainSedo boolean  

UserRole

Code Data types Description
userId integer  
roleId integer  
isFullAccess boolean  
role Role  
user User  

Role

Code Data types Description
id integer  
name string  
trackerCode string  
participantId integer  
rolePsRestriction array of RolePsRestriction  
bins array of BankBin  
users array of UserRole  
isDisputeEnabled boolean  
isSiomEnabled boolean  
isTrxEnabled boolean  
isSystem boolean  
enabledSubsystems string of enabledSubsystems  

RolePsRestriction

Code Data types Description
roleId integer  
paymentSystemId integer  
paymentSystem string of paymentSystem  
issuer boolean  
acquirer boolean  
paymentSystemDB PaymentSystemDB  

PaymentSystemDB

Code Data types Description
id integer  
code string  
paymentSystemEnum string of paymentSystemEnum  

BpItemHistoryEvent

Code Data types Description
id integer  
date string  
bpItemId integer  
bpItem BpItemDb  
participantId integer  
participant Participant  
userId integer  
user User  
eventType string of eventType  
value string  

BpItemDb

Code Data types Description
id integer  
bpVersionId integer  
bpVersion BpVersion  
dateCreate string  
dateEnd string  
activeItemStageId integer  
trxXml string  
trxId string  
acquirerBin string  
issuerBin string  
acquirerInitiator boolean  
code string  
arn string  
pan string  
isArchive boolean  
paymentSystem string of paymentSystem  
fieldValues array of ItemFieldValue  
isReversalExists boolean  

BpVersion

Code Data types Description
id integer  
bpId integer  
bp Bp  
versionNumber string  
description string  
dateCreate string  
dateFrom string  
dateTo string  
userLogin string  
startRuleGroupId integer  
isOpe boolean  
startRuleGroup BpRuleGroup  
hideRuleGroup BpRuleGroup  
hideRuleGroupId integer  
stages array of Stage  
itemFields array of ItemField  
localizationGroupItems array of LocalizationGroup  

Bp

Code Data types Description
id integer  
code string  
name string  
hideStartButton boolean  

BpRuleGroup

Code Data types Description
id integer  
bpVersionId integer  
groupType integer  
parentGroupId integer  
description string  
bpRules array of BpRule  
bpRuleGroups array of BpRuleGroup  

BpRule

Code Data types Description
id integer  
bpVersionId integer  
code string  
operator string  
value string  
params string  
parentGroupId integer  
description string  

Stage

Code Data types Description
id integer  
bpVersionId integer  
code string  
name string  
isStart boolean  
description string  
longDescription string  
isPreferred boolean  
imgUrl string  
isFinal boolean  
isHeaderView boolean  
stageFields array of StageField  
actions array of Action  
preferredRuleGroupId integer  
preferredRuleGroup BpRuleGroup  

StageField

Code Data types Description
stageId integer  
id integer  
fieldTypeId integer  
readOnly boolean  
visible boolean  
permissionRuleGroupId integer  
orderNo integer  
value string  
description string  
mandatoryDescription string  
permissionRuleGroup BpRuleGroup  
fieldType FieldType  

FieldType

Code Data types Description
id integer  
code string  
name string  
baseTypeCode string  
minLength integer  
maxLength integer  
mask string  
jsValidator string  
csValidator string  
cssClass string  
selectMethod string  
calcMethod string  
controlWidth string  
values array of FieldTypeValue  

FieldTypeValue

Code Data types Description
id integer  
fieldTypeId integer  
code string  
value string  
permissionRuleGroupId integer  
permissionRuleGroup BpRuleGroup  

Action

Code Data types Description
id integer  
stageFromId integer  
stageToId integer  
stageToCode string  
code string  
name string  
permissionRuleGroupId integer  
actionMethod string  
timeCountTypeId integer  
timeCountValue integer  
buttonColor string  
buttonIcon string  
isAutoAction boolean  
actionType string of actionType  
actionTypeId integer  
headerName string  
configuration string  
confirmationType integer  
permissionRuleGroup BpRuleGroup  
actionFields array of ActionField  
timeCountType TimeCountType  
additionalActionTransitions array of AdditionalActionTransition  
isGroupAction boolean  
groupHeaderName string  
groupLongDescription string  
canUndo boolean  

ActionField

Code Data types Description
id integer  
actionId integer  
fieldCode string  
hideOnGroupAction boolean  

TimeCountType

Code Data types Description
id integer  
code string  
name string  
calcMethod string  

AdditionalActionTransition

Code Data types Description
id integer  
actionId integer  
stageToId integer  
code string  
stageToCode string  
actionMethod string  

ItemField

Code Data types Description
bpVersionId integer  
id integer  
fieldTypeId integer  
readOnly boolean  
visible boolean  
permissionRuleGroupId integer  
orderNo integer  
value string  
description string  
mandatoryDescription string  
permissionRuleGroup BpRuleGroup  
fieldType FieldType  

LocalizationGroup

Code Data types Description
code string  
items array of LocalizationItem  

LocalizationItem

Code Data types Description
langCode string  
value string  

ItemFieldValue

Code Data types Description
id integer  
bpItemId integer  
itemFieldId integer  
stringValueId integer  
textValueId integer  
dateTimeValueId integer  
integerValueId integer  
decimalValueId integer  
binaryValueId integer  

Enumerations

confirmationType

Value
None
Email

authorType

Value
NotSet
Initiator
Recipient
Nspk

paymentSystem

Value
Undefined
Test
MasterCard
Visa
Mir
UPI
AmEx
JCB
DinersClub

activityType

Value
None
Acquirer
Issuer

delegateForSystem

Value
None
Dispute
Siom
Trx

accessType

Value
None
ReadOnly
FullAccess

userType

Value
AdUser
LocalUser

paymentSystemEnum

Value
Undefined
Test
MasterCard
Visa
Mir
UPI
AmEx
JCB
DinersClub

enabledSubsystems

Value
None
Dispute
Siom
Trx

restriction

Value
None
ParticipantManagement
Arbiter
Administrator
DisputeUser
SiomUser
TrxUser

actionType

Value
Manual
Timer
Auto_DO1
Auto_Reversal
Chargeback
SecondPresentment
ArbitrationChargeback
ChargebackReversal
SecondPresentmentReversal
ArbitrationChargebackReversal

eventType

Value
UnreadMarker_On
UnreadMarker_Off
CustomFieldEdit