Only viable for MasterPass payments. Caclulates fee using a Merchant ID, wallet session id and amount. This is useful if the shipping address returned by MasterPass has raised a shipping fee or if the merchant wants to shift the fee to customer

The endpoint for the JSON service:

All input parameters to this script should be posted as plain POST-parameters (no JSON wrapping).


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

<form method="post" action="">
  <input type="hidden" name="merchantId" value='90058096' />
  <input type="hidden" name="walletSessionId" value='426967348' />
  <input type="hidden" name="amount" value='100' />
  <input type="hidden" name="MAC" value='57480a7f5dbd4fc4919e32a08224c1ed32439542f76e6a0a7449df1034c6b0f62' />

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

Below is an example of the text output of the mpCalcFee service, both for an accepted and declined request.


Input parameters

Parameter Type Description
merchantId * String, max 36 letters Merchant identification number
walletSessionId * String Id of the existing wallet card session
amount * Integer Amount to authorize in smallest units (eg 100 for 1 EUR) (should include all additional fees).
MAC * String, 64 letters This parameter contains a Message Authentication Code. See our HMAC calculation guide for further information

*: Always validated by DIBS

Return parameters

Parameter Type Description
status [ACCEPTED, ERROR] Status of the call. ACCEPTED means that agreement was found and fee was calculated.
fee Integer Fee amount in smallest units (eg 100 for 1 EUR).


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