Data formats

The services will be exposed as SOAP WebServices and CGI (JSON POST)

Formats

SOAP

Endpoint

XML example:

<RefundTransactionRequest>
  <transactionId>42</transactionId>
  <amount>1000</amount>
  <MAC>0xb613679a0814d9ec772f95d778c35fc5ff1697c493715653c6c712144292c5ad</MAC> 
</RefundTransactionRequest>

JSON

Please notice that the JSON string should be sent in a single POST parameter. The name of this parameter is not important. It is important to send "Content-Type:application/x-www-form-urlencoded" http-header, otherwise http-request parameters will not be parsed. There are some restrictions coming from JSON parser (Jackson):

  • attribute names should be in quotes
  • values of string type should also be in quotes

Specification could be found here:

http://jackson.codehaus.org/

Wiki:

http://wiki.fasterxml.com/JacksonHome

Here's valid request to the AuthorizeCard JSON service sent as a standard HTML form:

<form method="post" action="https://v2.api.dibspayment.com/merchant/v1/JSON/Transaction/AuthorizeCard" enctype="application/x-www-form-urlencoded">
<input name="request" value='{
  "merchantId":"98765432",
  "amount":"123",
  "currency":"208",
  "orderId":"123456789",
  "cardNumber":"4711100000000000",
  "expMonth":"6",
  "expYear":"24",
  "cvc":"684",
  "clientIp":"123.321.123.321",
  "MAC":"053b160f1b6e9d941a1c8e0834b2d371b7bdac54dd53e55ee2fcba17f6f511d2",
  "test":"true"
}' type="hidden" />
</form>

It will be sent as single POST parameter named 'request' with value consisting of all parameters and their corresponsing values.

The response will have the JSON form:   

{"transactionId":"789456123","status":"ACCEPT","acquirer":"test"} 
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