mpInitForm

The mpInitForm service initiates flow for wallet cards (Masterpass) and returns id of the session, that can be used for future payment authorization without sending any card parameters. On success service return a redirectUrl, which is used by merchant to direct user to the Masterpass site, where user has to choose his card and shipping address and confirm payment information

Confirmation page Consumer should have the opportunity to review the order on the merchant site before finalizing the purchase and payment. The final step should not occur inside the Masterpass Wallet.

Input parameters

Parameter name Description
shopName

Merchant shopname, provided by DIBS

userName

API-Username, generated by merchant in DIBS Manager

password

API-User password, generated by merchant in DIBS Manager

data

All information applying to the consumer’s order is included in the data parameter. Please refer to our order information page regarding the format of this parameter.

currency

You have the option of controlling the currency you wish to use via the currency parameter. The value of the currency must be in what is known as the ISO-4217 ISO/SWIFT currency format (e.g. SEK, GBP, USD, NOK, DKK, FIM), and in uppercase letters. Refer to http://currency.xe.net/gen/iso4217.htm for a complete list.

ip

The IP number of the customer. If the IP address is not available, please send the empty string.

suppressShippingAddress

true: don't show shipping addresses on Masterpass site

false: to show shipping addresses on Masterpass site

test

true: to use sandbox of Masterpass

false: to use production Masterpass

acceptableCards

Comma delimited list of accepted cards. Possible values: master,amex,diners,discover,maestro,visa

Card Valid values
MasterCard master
American Express amex
Diners diners
Discover discover
Maestro maestro
Visa visa
shippingLocationProfile

This parameter determines the regions your company ships to. Use one of the accepted values below.

 

If no shippingLocationProfile parameter is sent to DIBS, or the parameter is unsupported by the card-issuers wallet, the value DKNOSE will be used by default.

 

Shipping Locations Accepted values
Denmark DK
Finland FI
Norway NO
Sweden SE
Denmark,Finland DKFI
Denmark, Norway DKNO
Denmark, Sweden DKSE
Finland, Norway FINO
Finland, Sweden FISE
Norway, Sweden NOSE
Denmark, Finland, Norway DKFINO
Denmark, Finland, Sweden DKFISE
Denmark, Norway, Sweden DKNOSE
Finland, Norway, Sweden FINOSE
Denmark, Finland, Norway Sweden DKFINOSE
All countries (no restrictions) all
shippingFirstName

Recipient first name, if this parameter is defined then parameter 'suppressShippingAddress' '  will be set in true by system

shippingLastName

Recipient last name, if this parameter is defined then parameter 'suppressShippingAddress' will be set in true by system

shippingAddressLine1

Address line 1 used for Street number and Street Name, if this parameter is defined then parameter 'suppressShippingAddress'  will be set in true by system

shippingAddressLine2

Address line 2 used for Apt Number, Suite Number ,etc. If this parameter is defined then parameter 'suppressShippingAddress'  will be set in true by system

shippingCountry

Shipping Country.

Defined by ISO 3166-1 alpha-2 digit country codes e.g. US is United States, AU is Australia, CA is Canada, GB is United Kingdom, etc.

If this parameter is defined then parameter 'suppressShippingAddress'  will be set in true by system

shippingCity

Shipping City

shippingZipCode

Zip code for shipping

consumerPhone The consumers phone number specified by merchant. This value will be included in mpValidate response.
consumerEmail The consumers email specified by merchant. This value will be included in mpValidate response.
referenceNo

This parameter is used when the customer wish to place a merchant reference number on an order in DIBS system which allows it to be searchable via DIBS Manager.

This parameter must be unique for each new payment.

extra

Please refer to the description of the 'extra' parameter on the Web Service page.

MAC

MAC should be included in the 'extra' parameter described above. It should be added in this manner: &amp;MAC=<value>

The MAC is calculated with the following formula:
data&currency&[referenceData&]SecretKey&

Note: The referenceData placeholder is used if any of the following parameters are sent: referenceNo, orderNo or invoiceNo. If for example both referenceNo and invoiceNo are used in the call, referenceData should be equal to referenceNo and invoiceNo should not be included in the calculation.

 

Output parameters

Parameter name Description
verifyID

DIBS reference number

oAuthToken

oAuthToken from Masterpass

resultCode

DIBS result code

resultText

DIBS result text

amount

Transaction amount

initFormURL

URL for Masterpass that the merchant should redirect consumers to

 

Example

Below is an example of a request:

<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:v2="https://securedt.dibspayment.com/DTServerModuleService/v2">
   <soap:Header/>
   <soap:Body>
      <v2:mpInitForm>
         <v2:shopName>ShopName</v2:shopName>
         <v2:userName>API_User</v2:userName>
         <v2:password>Password</v2:password>
         <v2:data>Stock_item_number:Stock_item_name:Number_of_items:Unit_price_per_item:</v2:data>
         <v2:currency>SEK</v2:currency>
         <v2:ip>127.0.0.1</v2:ip>
         <v2:suppressShippingAddress>false</v2:suppressShippingAddress>
         <v2:test>false</v2:test>
         <v2:acceptableCards>master,visa</v2:acceptableCards>
         <v2:shippingLocationProfile>SE</v2:shippingLocationProfile>
         <v2:shippingFirstName>Jens</v2:shippingFirstName>
         <v2:shippingLastName>Askeben</v2:shippingLastName>
         <v2:shippingAddressLine1>Arne Jacobsens alle 13</v2:shippingAddressLine1>
         <v2:shippingAddressLine2>1st Floor, Left</v2:shippingAddressLine2>
         <v2:shippingCountry>SE</v2:shippingCountry>
         <v2:shippingCity>Copenhagen S</v2:shippingCity>
         <v2:shippingZipCode>2300</v2:shippingZipCode>
         <v2:consumerPhone>+45 7020 3077</v2:consumerPhone>
         <v2:consumerEmail>salg@dibs.dk</v2:consumerEmail>
         <v2:referenceNo>Ref-5555</v2:referenceNo>
         <v2:extra>@amp;MAC=3420sdf509342f85032850342</v2:extra>
      </v2:mpInitForm>
   </soap:Body>
</soap:Envelope>

And the following is an example of a response:

<soapenv:Envelope xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope">
   <soapenv:Body>
      <ns:mpInitFormResponse xmlns:ns="https://securedt.dibspayment.com/DTServerModuleService/v2">
         <ns:return>
            <ns:amount>100</ns:amount>
            <ns:initFormURL>https://masterpass.com/Checkout/Authorize?oauth_token=c5a662d995e34062a676ec7c3797aafb0cc991df&amp;acceptable_cards=master,amex,diners,discover,maestro,visa&amp;checkout_identifier=a4a6w4vnlupufi1kx2rtm1i23pgsok64ej&amp;version=v5&amp;suppress_shipping_address=true</ns:initFormURL>
            <ns:oAuthToken>c5a662d995e34062a676ec7c3797aafb0cc991df</ns:oAuthToken>
            <ns:resultCode>113</ns:resultCode>
            <ns:resultText>init_form_OK</ns:resultText>
            <ns:verifyID>46897</ns:verifyID>
         </ns:return>
      </ns:mpInitFormResponse>
   </soapenv:Body>
</soapenv:Envelope>
Do you have a 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