MPI API

Schema

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
  elementFormDefault="unqualified" attributeFormDefault="unqualified" targetNamespace="http://mpi.netcetera.com/1.0">
 
  <xs:import schemaLocation="ThreeDSecure.xsd" />
 
  <xs:element name="PaReqCreationRequest">
    <xs:annotation>
      <xs:documentation>
        <![CDATA[
          Root element of the PaReq creation request.
        ]]>
      </xs:documentation>
    </xs:annotation>
    <xs:complexType>
      <xs:annotation>
        <xs:documentation>
          <![CDATA[
            The PaReqCreationRequest passed to MPI for the createPaReqIfEnrolled call.
          ]]>
        </xs:documentation>
      </xs:annotation>
      <xs:sequence>
        <xs:element name="cardholder" type="mpi:Cardholder" minOccurs="0" />
        <xs:element name="purchase" type="mpi:Purchase" minOccurs="0" />
        <xs:element name="merchant" type="mpi:Merchant" minOccurs="0" />
        <xs:element name="browser" type="mpi:Browser" minOccurs="0" />
      </xs:sequence>
    </xs:complexType>
  </xs:element>
 
  <xs:element name="PaReqCreationResponse">
    <xs:annotation>
      <xs:documentation>
        <![CDATA[
          Root element of the PaReq creation response.
        ]]>
      </xs:documentation>
    </xs:annotation>
    <xs:complexType>
      <xs:annotation>
        <xs:documentation>
          <![CDATA[
            The response returned from the createPaReqIfEnrolled call.
          ]]>
        </xs:documentation>
      </xs:annotation>
      <xs:sequence>
        <xs:element name="SessionId" type="mpi:SessionId" minOccurs="1" />
        <xs:element name="PaReq" type="xs:string" minOccurs="0" />
        <xs:element ref="VEReq" minOccurs="0" />
        <xs:element ref="VERes" minOccurs="0" />
        <xs:element name="Error" type="mpi:ErrorDetails" minOccurs="0" />
      </xs:sequence>
    </xs:complexType>
  </xs:element>
 
  <xs:element name="PaResValidationRequest">
    <xs:annotation>
      <xs:documentation>
        <![CDATA[
          Root element of the PaRes validation request.
        ]]>
      </xs:documentation>
    </xs:annotation>
    <xs:complexType>
      <xs:annotation>
        <xs:documentation>
          <![CDATA[
            The PaResValidationRequest passed to MPI for the validatePaRes call.
          ]]>
        </xs:documentation>
      </xs:annotation>
      <xs:sequence>
        <xs:element name="paRes" type="xs:string" minOccurs="0">
          <xs:annotation>
            <xs:documentation>
              <![CDATA[
                The deflated and base64 encoded PaRes, as returned from the ACS.
              ]]>
            </xs:documentation>
          </xs:annotation>
        </xs:element>
      </xs:sequence>
    </xs:complexType>
  </xs:element>
 
  <xs:element name="PaResValidationResponse">
    <xs:annotation>
      <xs:documentation>
        <![CDATA[
          Root element of the PaRes validation response.
        ]]>
      </xs:documentation>
    </xs:annotation>
    <xs:complexType>
      <xs:annotation>
        <xs:documentation>
          <![CDATA[
            The PaResValidationResponse returned to the Merchant after Payer Authentication Process.
          ]]>
        </xs:documentation>
      </xs:annotation>
      <xs:sequence>
        <xs:element name="SessionId" type="mpi:SessionId" minOccurs="1" />
        <xs:element name="Cavv" type="xs:string" minOccurs="0" />
        <xs:element name="Eci" type="xs:string" minOccurs="0" />
        <xs:element name="TransactionStatus" type="xs:string" minOccurs="0" />
        <xs:element name="Xid" type="xs:string" minOccurs="0" />
        <xs:element name="Error" type="mpi:ErrorDetails" minOccurs="0" />
      </xs:sequence>
    </xs:complexType>
  </xs:element>
 
  <xs:complexType name="Cardholder">
    <xs:annotation>
      <xs:documentation>
        <![CDATA[
          The element containing cardholder related data.
        ]]>
      </xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="pan" type="xs:string" minOccurs="0">
        <xs:annotation>
          <xs:documentation>
            <![CDATA[
              The cardholder pan.
   
              - Length: 13-19 characters
              - Format: numeric digits
            ]]>
          </xs:documentation>
        </xs:annotation>
      </xs:element>
 
      <xs:element name="expiry" type="xs:string" minOccurs="0">
        <xs:annotation>
          <xs:documentation>
            <![CDATA[
              Expiration Date supplied to merchant by cardholder (YYMM).
   
              - Length: 4 characters
              - Format: numeric digits
            ]]>
          </xs:documentation>
        </xs:annotation>
      </xs:element>
    </xs:sequence>
  </xs:complexType>
 
  <xs:complexType name="Browser">
    <xs:annotation>
      <xs:documentation>
        <![CDATA[
          The element containing browser related data.
        ]]>
      </xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="accept" type="xs:string" minOccurs="0">
        <xs:annotation>
          <xs:documentation>
            <![CDATA[
              The exact content of the HTTP accept sent to the merchant from the cardholder's browser.
   
              - Length: 0-2048 characters
              - Format: any characters
            ]]>
          </xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="userAgent" type="xs:string" minOccurs="0">
        <xs:annotation>
          <xs:documentation>
            <![CDATA[
              The exact content of the HTTP accept sent to the merchant from the cardholder's browser.
   
              - Length: 0-256 characters
              - Format: any characters
            ]]>
          </xs:documentation>
        </xs:annotation>
      </xs:element>
    </xs:sequence>
  </xs:complexType>
 
  <xs:complexType name="Purchase">
    <xs:annotation>
      <xs:documentation>
        <![CDATA[
          The element containing the purchase related data.
        ]]>
      </xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="amount" type="xs:string" minOccurs="0">
        <xs:annotation>
          <xs:documentation>
            <![CDATA[
              Purchase amount in minor units of currency with all punctuation removed.
   
              - Length: 1-12 characters
              - Format: numeric digits
            ]]>
          </xs:documentation>
        </xs:annotation>
      </xs:element>
 
      <xs:element name="currency" type="xs:string" minOccurs="0">
        <xs:annotation>
          <xs:documentation>
            <![CDATA[
              ISO 4217 three digit currency code.
   
              - Length: 3 characters
              - Format: numeric digits
              - Value:  ISO 4217 three digit currency
                        code, other than those listed in
                        Table C-9 of the 3-D Secure protocol
                        specification.
            ]]>
          </xs:documentation>
        </xs:annotation>
      </xs:element>
 
      <xs:element name="description" type="xs:string" minOccurs="0">
        <xs:annotation>
          <xs:documentation>
            <![CDATA[
              Brief description of items purchased.
   
              - Length: 0-125 characters
              - Format: any characters
            ]]>
          </xs:documentation>
        </xs:annotation>
      </xs:element>
 
      <xs:element name="xid" type="xs:string" minOccurs="0">
        <xs:annotation>
          <xs:documentation>
            <![CDATA[
              Transaction identifier determined by merchant. Contains a 20 byte value (not Base64 encoded)
              that will be Base64 encoded by MPI, giving a 28 byte result.
   
              - Length: 20 byte characters
              - Format: any character
            ]]>
          </xs:documentation>
        </xs:annotation>
      </xs:element>
    </xs:sequence>
  </xs:complexType>
 
  <xs:complexType name="Merchant">
    <xs:annotation>
      <xs:documentation>
        <![CDATA[
          The element containing the merchant related data.
        ]]>
      </xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="acqBIN" type="xs:string" minOccurs="0">
        <xs:annotation>
          <xs:documentation>
            <![CDATA[
              Acquiring institution identification code.
   
              - Length: 1-11 characters
              - Format: numeric digits
            ]]>
          </xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="password" type="xs:string" minOccurs="0">
        <xs:annotation>
          <xs:documentation>
            <![CDATA[
              Merchant password provided by merchant's acquirer.
   
              - Length: 8 characters
              - Format: alphanumeric
            ]]>
          </xs:documentation>
        </xs:annotation>
      </xs:element>
 
      <xs:element name="countryCode" type="xs:string" minOccurs="0">
        <xs:annotation>
          <xs:documentation>
            <![CDATA[
              ISO 3166 three digit country code.
   
              - Length: 3 characters
              - Format: numeric digits
              - Value:  ISO 3166 three digit country
            ]]>
          </xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="id" type="xs:string" minOccurs="0">
        <xs:annotation>
          <xs:documentation>
            <![CDATA[
              Acquirer-defined merchant identifier.
   
              - Length: 1-24 characters
              - Format: any characters
            ]]>
          </xs:documentation>
        </xs:annotation>
      </xs:element>
 
      <xs:element name="name" type="xs:string" minOccurs="0">
        <xs:annotation>
          <xs:documentation>
            <![CDATA[
              Merchant name to be displayed on Authentication Request Page.
   
              - Length: 1-25 characters
              - Format: any characters
            ]]>
          </xs:documentation>
        </xs:annotation>
      </xs:element>
 
      <xs:element name="url" type="xs:string" minOccurs="0">
        <xs:annotation>
          <xs:documentation>
            <![CDATA[
              Fully qualified URL of merchant Web site or customer care site (http(s)://domainname/...).
   
              - Length: 1-2048 characters
              - Format: any characters
            ]]>
          </xs:documentation>
        </xs:annotation>
      </xs:element>
    </xs:sequence>
  </xs:complexType>
 
  <xs:complexType name="ErrorDetails">
    <xs:annotation>
      <xs:documentation>
        <![CDATA[
          The potential Error result returned to the Merchant after Payer Authentication Process.
        ]]>
      </xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="Message" type="xs:string" minOccurs="0" />
    </xs:sequence>
    <xs:attribute name="code" type="xs:string" use="required" />
    <xs:attribute name="element" type="xs:string" use="optional" />
  </xs:complexType>
 
  <xs:simpleType name="SessionId">
    <xs:annotation>
      <xs:documentation>
        <![CDATA[
          Correlation id between Verify Enrollment and Payer Authentication processes.
        ]]>
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:string" />
  </xs:simpleType>
</xs:schema>

Note that the schema for the MPI includes the 3-D Secure schema (ThreeDSecure.xsd) to refer to 3-D Secure protocol messages used in the response structures.

PaReqCreationRequest samples

MPI offers two possibilities to transfer the merchant data to the Directory Server:

  • Merchant configured in the MPI Configuration file
  • Merchant configuration data passed in the PaReqCreationRequest

Merchant configured in MPI configuration

When Merchant is configured as part of the MPI Configuration, required merchant.id should be passed in the PaReqCreationRequest and should match the id of the configured Merchant.

Request POST parameters
1
cardholder.pan=4234123412340000&cardholder.expiry=1612&purchase.xid=ohwh6kwpIYuBXALo2jHd&purchase.amount=10000&purchase.currency=756&purchase.description=description&merchant.id=merId&browser.accept=application/xml&browser.userAgent=mozilla
XML
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
<mpi:PaReqCreationRequest xmlns:mpi="http://mpi.netcetera.com/1.0">
  <cardholder>
    <pan>4234123412340000</pan>
  <expiry>1612</expiry>
  </cardholder>
  <purchase>
    <amount>10000</amount>
    <currency>756</currency>
    <description>description</description>
    <xid>ohwh6kwpIYuBXALo2jHd</xid>
  </purchase>
  <merchant>
    <id>merId</id>
  </merchant>
  <browser>
    <accept>application/xml</accept>
    <userAgent>mozilla</userAgent>
  </browser>
</mpi:PaReqCreationRequest>
JSON
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
{
  "cardholder": {
    "pan": "4234123412340000",
    "expiry": "1612"
  },
  "purchase": {
    "amount": "10000",
    "currency": "756",
    "description": "description",
    "xid": "ohwh6kwpIYuBXALo2jHd"
  },
  "merchant": {
    "id": "merId"
  },
  "browser": {
    "accept": "application/xml",
    "userAgent": "mozilla"
  }
}

Merchant configuration data in PaReqCreationRequest

If Merchant data is in the Payment Platform, MPI offers possibility to pass it as part of the PaReqCreationRequest, instead of configuring it in the MPI Configuration.
As a prerequisite to use this feature, MPI should have the Merchant's Acquirer configured (with Bin and ClientCertificate), which is required for Directory Server client authentication.

Required merchant data that should be passed in PaReqCreationRequest needed in this case is:

  • merchant.acqBIN
  • merchant.countryCode
  • merchant.id
  • merchant.url
  • merchant.name
  • purchase.currency

Optional is:

  • merchant.password
Request POST parameters
1
cardholder.pan=4234123412340000&cardholder.expiry=1612&purchase.xid=ohwh6kwpIYuBXALo2jHd&purchase.amount=10000&purchase.currency=756&purchase.description=description&merchant.acqBIN=123456&merchant.password=password&merchant.countryCode=756&merchant.id=merId&merchant.url=http%3A%2F%2Flocalhost%3A8080%2Fmpi&merchant.name=Merchant&browser.accept=application/xml&browser.userAgent=mozilla
XML
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
<mpi:PaReqCreationRequest xmlns:mpi="http://mpi.netcetera.com/1.0">
  <cardholder>
    <pan>4234123412340000</pan>
  <expiry>1612</expiry>
  </cardholder>
  <purchase>
    <amount>10000</amount>
    <currency>756</currency>
    <description>description</description>
    <xid>ohwh6kwpIYuBXALo2jHd</xid>
  </purchase>
  <merchant>
    <acqBIN>123456</acqBIN>
    <password>password</password>
    <countryCode>756</countryCode>
    <id>merId</id>
    <name>Merchant</name>
    <url>http://localhost:8080/mpi</url>
  </merchant>
  <browser>
    <accept>application/xml</accept>
    <userAgent>mozilla</userAgent>
  </browser>
</mpi:PaReqCreationRequest>
JSON
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
{
  "cardholder": {
    "pan": "4234123412340000",
    "expiry": "1612"
  },
  "purchase": {
    "amount": "10000",
    "currency": "756",
    "description": "description",
    "xid": "ohwh6kwpIYuBXALo2jHd"
  },
  "merchant": {
    "acqBIN": "123456",
    "password": "password",
    "countryCode": "756",
    "id": "merId",
    "name": "Merchant",
    "url": "http://localhost:8080/mpi"
  },
  "browser": {
    "accept": "application/xml",
    "userAgent": "mozilla"
  }
}

PaResValidationRequest samples

Request POST parameters

1
paRes=4j6h89g4kd92ks2==

XML

1
2
3
<mpi:PaResValidationRequest xmlns:mpi="http://mpi.netcetera.com/1.0">
  <paRes>4j6h89g4kd92ks2==</paRes>
</mpi:PaResValidationRequest>

JSON

1
2
3
{
  "paRes": "4j6h89g4kd92ks2=="
}