mpValidate

The mpValidate service is called by the merchant when the consumer returns from the MP site. It verifies the consumer’s request and fetches the card data for the consumer’s chosen payment method. In some cases it also retrieves the shipping address

The endpoint for the JSON service: https://payment.architrade.com/cgi-ssl/mpvalidate.cgi

The input parameters should be encapsuled in a JSON-object and sent as a HTTP POST in a parameter called 'request'. Similarly, the returned parameters will be in JSON-format and returned in a parameter called 'response'.

Examples

Below is an example of a request for the mpValidate JSON service.

<form method="post" action="https://payment.architrade.com/cgi-ssl/mpvalidate.cgi">
  <input name="request" value='{
    "merchantId":"90058096",
    "walletSessionId":"426967348",
    "oAuthToken":"123456740643c995ab6f8540d5393c191d123456",
    "oAuthVerifier":"1234567a284475337a1ef74d3631ac0f41234567",
    "checkoutResourceUrl":"https://sandbox.api.mastercard.com/online/v5/checkout/311234567",
  }' type="hidden" />

  <input name="Test" value='Test' type="submit" />
</form>

Below is an example of the text output of the mpValidate service:

response={
  "MpValidateResponse": {
    "cardBrandId": "master",
    "cardBrandName": "MasterCard",
    "maskedCardNumber": "XXXXXXXXXXXX5747",
    "Contact": {
      "FirstName": "Dibs",
      "LastName": "Dibs",
      "Country": "US",
      "EmailAddress": "test@somemail.com",
      "PhoneNumber": "1-0011223344",
      "Gender": "MALE"
    },
    "shippingAddress": {
      "City": "Stockholm",
      "Country": "SE",
      "Line1": "SomeAddress",
      "RecipientName": "Dibs Dibs",
      "RecipientPhoneNumber": "US+1-0011223344",
      "PostalCode": "10823"
    },
    "status": "ACCEPTED"
  }
}

Input parameters

Parameter Type Description
merchantId * Strin, max 36 letters Merchant identification number
walletSessionId * String Id of the existing walled card session returned by the mpInit service.
oAuthVerifier * String An authorization checksum from MasterPass
checkoutResourceUrl * String (URL) An endpoint URL for the MasterPass checkout service.
MAC * String, 64 letters This parameter contains a Message Authentication Code. See our HMAC calculation guide for further information

*: Always validated by DIBS

Output parameters

Parameter Type Description
cardBrandId String The <BrandId> from the MP checkout resource, e.g. “MC”.
cardBrandName String The <BrandName> from the MP checkout resource, e.g. “MasterCard”. Returned if status = ACCEPTED.
Contact ContactInfo object

Wallet owner's contact information. See below for more information.

declineReason String Reason for decline or error (Master Pass internal message, if presented, or default satellite error message), null for ACCEPTED status.
maskedCardNumber String A masked card number based on the <AccountNumber>  from the MP checkout resource, e.g. "************1234". It is intended for display to the consumer prior to a final acceptance of the payment.
shippingAddress SimpleContactInfo An optional shipping address. It will only be present if the consumer picked a shipping address during checkout.
status [ACCEPTED, ERROR]  Status of the call. ACCEPTED means that request was processed and the Master Pass information is returned.

ContactInfo object

Parameter Type Description
FirstName String Contact First Name
LastName String Contact Surname
MiddleName String, Optional Contact Middle Name or Initial
Country String, Optional Contact Country of Residence
EmailAddress String Contact Email Address
PhoneNumber String Contact Phone
Gender String Contact Gender (MALE or FEMALE)

 

Do you have question or need help?
Follow us
DIBS Payment Services
Stockholm +46 (0)8-527 525 00
Göteborg +46 031-600 800
København +45 7020 3077
Oslo +47 21 55 44 00