Dibs Payment Window

Klarna


Parameters specific for invoice payments

Form example for basic overview.

<html>
<body>
<form method="post" action="https://sat1.dibspayment.com/dibspaymentwindow/entrypoint">
<input value="12345678" name="merchant" type="hidden" />
<input value="208" name="currency" type="hidden" />
<input value="213455" name="orderId" type="hidden" />
<input value="610" name="amount" type="hidden" />
<input value="en_GB" name="language" type="hidden" />
<input value="https://yourdomain.com/acceptReturnUrl" name="acceptReturnUrl" type="hidden" />
<input value="https://yourdomain.com/cancelReturnUrl" name="cancelReturnUrl" type="hidden" />
<input value="https://yourdomain.com/callbackUrl" name="callbackUrl" type="hidden" />
<input value="QUANTITY;UNITCODE;DESCRIPTION;AMOUNT;ITEMID;VATAMOUNT" name="oiTypes" type="hidden" />
<input value="Items;UnitCode;Description;Amount;ItemId;VatAmount" name="oiNames" type="hidden" />
<input value="1;pcs;ACME Rocket Roller skates\; ultra fast;100;98;25" name="oiRow1" type="hidden" />
<input value="1;pcs;ACME Band Aid;100;99;25" name="oiRow2" type="hidden" />
<input value="1;pcs;Some description;100;45;25" name="oiRow3" type="hidden" />
<input value="John" name="billingFirstName" type="hidden" />
<input value="Doe" name="billingLastName" type="hidden" />
<input value="Hovedvejen 100" name="billingAddress" type="hidden" />
<input value="3. sal" name="billingAddress2" type="hidden" />
<input value="8888" name="billingPostalCode" type="hidden" />
<input value="Storeby" name="billingPostalPlace" type="hidden" />
<input value="johndoe@abcdef.dk" name="billingEmail" type="hidden" />
<input value="+45 1234 56789" name="billingMobile" type="hidden" />
<input value="Anton" name="shippingFirstName" type="hidden" />
<input value="Anonymsen" name="shippingLastName" type="hidden" />
<input value="Sidevejen 3" name="shippingAddress" type="hidden" />
<input value="stuen" name="shippingAddress2" type="hidden" />
<input value="7777" name="shippingPostalCode" type="hidden" />
<input value="Lilleby" name="shippingPostalPlace" type="hidden" />
<input value="100" name="shippingFee" type="hidden" />
<input value="2500" name="shippingFeeVAT" type="hidden" />
<input value="EMAIL" name="distributionType" type="hidden" />
<input value="100" name="invoiceFee" type="hidden" />
<input value="1000" name="invoiceFeeVAT" type="hidden" />
<input value="123" name="merchantName" type="hidden" />
<input value="1" name="noValidation" type="hidden" />
<input value="123" name="organizationNumber" type="hidden" />
<input value="6805235923" name="socialSecurityNumber" type="hidden" />
</form>
</body>
</html>


Parameters marked [parameter] are optional.

Parameter

Type

Description

amountlong - Minimum value of 1

Amount of transaction in smallest unit. Used to validate against prices in structured orderInformation.

orderidstring. Max 16 charactersFor invoice payments the orderid is limited to 16 characters
currencystring. 3 digits or 3 lettersCurrency specification as indicated in ISO4217 where the EUR is no. 978.
Also see our list of currencies.
acceptReturnUrlstring. max 1024 characters

The URL of the page to be displayed if the purchase is approved. Typically a page within the merchant's shop site. The parameters are returned to this URL using POST. HTTPS is not mandatory but it is highly recommended.

Note: The URL cannot be an IP-address or contain parameters. Example. ”?X=4&Y=2” The URL’s have to be ”clean”.

oiTypesString. Max 1024 characters

Order information column types must be in upper case. The data should be delimited by a semicolon. The order is significant and should match the other rows.

List of oitypes availble:
QUANTITY, DESCRIPTION, AMOUNT, VATAMOUNT or VATPERCENT, ITEMID, UNITCODE

Please notice:
The VAT amount must be specified and declared, either as VATPERCENT or VATAMOUNT .

oiNamesString. Max 1024 characters*

This parameter is deprecated. For compatibility reasons it will still be included in MAC calculation if sent, but it is otherwise not used.

oiRow(1..n)String. Max 1024 characters*

Order information data row (oirow1, oirow2, oirow3 etc). The data should be delimited by a semicolon and the order is significant and should match the other rows. Semicolons that are part of the order information are to be escaped with a backslash.

Example:
oirow1=1;pcs;ACME Rocket Roller skates\; ultra fast;100;98;25
oirow2=1;pcs;ACME Band Aid;100;99;25
oirow3=1;pcs;Some description;100;45;25
[billingFirstName]string

Customer's billing first name.

[billingLastName]string

Customer's billing last name.

[billingAddress]string

Customer's billing street address. If acquirer doesn't support getAddress but requires user to enter some billing address information, this parameter can be used to prepopulate values on IW 1st page/or set values on merchant's/legacy system's side. If acquirer returns appropriate value in getAddress/placeOrder - value from acquirer will override value sent in this parameter.

[billingAddress2]string

Customer's billing street address (continued).

[billingPostalCode]string

Customer's billing postal code

[billingPostalPlace]string

Customer's billing postal place (city, town, etc).

[billingEmail]String. Max 128 characters

Customer's email address. Can be passed along to the acquirer if applicable.

Note: That this parameter is mandatory when using the polish wire transfer service Przelewy24.

Example:
<input type="hidden" name="billingEmail" value="my@email.com"/>

[billingMobile]String. Max 1024 characters

Customer's mobile number. Can be passed along to the acquirer if applicable.

Note that we only accept a row of digits and spaces optionally prepended by a '+'

[shippingFirstName]string

Customer's first name.

[shippingLastName]string

Customer's last name.

[shippingAddress]string

Customer's shipping street address. If acquirer supports delivery to address specified by merchant (different from registered on acquirer), this parameter should be used.

[shippingAddress2]string

Customer's shipping street address (continued).

[shippingPostalCode]stringCustomer's shipping postal code.
[shippingPostalPlace]string

Customer's shipping postal place (town, city, etc.).

[shippingFee]string

Shipping Fee (expressed in smallest unit of currency).

[ShippingFeeVAT]string

Shipping Fee VAT (e.g. "25%" is expressed as "2500"), must be filled if shippingFee is present.

[socialSecurityNumber]string

Invoice specific parameter - social security number (ssn).

[merchantName]string

Merchant's name to be displayed. Default is read from the merchants Dibs agreement.

[invoiceFee]number

Invoice fee (expressed in minor unit of currency).

[invoiceFeeVAT]number

Invoice Fee VAT (e.g. "25%" is expressed as "2500"), must be filled if invoiceFee is present.

[organizationnumber]string

Invoice specific parameter - organization number (orgno).

[comments]string

The place for any additional comments.

[distributionType]String. EMAIL or PAPER

Invoice specific parameter - type of distribution of invoices to customer. If distributiontype is set to EMAIL then billingEmail must be set.
Accepted values  EMAIL or PAPER and must be in upper case.

[exchangeRate]Double

Used with invoice when creating order information.

[statCodeNum]Long

Numerical code used for labelling orders, e.g., the code of the seller who handled the order. Used for statistical purposes.

[statCodeAlphaNum]String

Textual code used for labelling orders, e.g., the code of the seller who
handled the order. Used for statistical purposes.

[ourRef]string

 The shop's order reference.

[yourRef]string

The customer's order reference.

[pclass]string

Campaign code. Indicates campaign used in part payments/installments.

[ysalary]string

Customer's yearly salary – specified in ore or cents.

 

Order information and invoice.


When a merchant has an invoice acquirer then there are some rules about the order information; it is mandatory to have order rows and the total amount of the rows shall match the amount passed along to the DIBS Payment Window.

Total amount calculation and validation:

Terms and conventions:


  • Price, amount - This value must contain price or amount in the lowest measuring unit of the currency. For example, for US dollars the lowest measure unit is cent, so a value which represents $1.25 is 125.
  • % (percent) - This value represents percents multiplied by 100, i.e. maximum precision is 2 fractional digits. To represent 25% the value2500 should be used, for 100% use 10000.
  • ROUND function rounds up any amount value which is >=0.5, rounds down any value <0.5.

Order amount and fees:

Order amount is the sum of all order item amounts, taking quantity and VAT into account. With each order item there are two possible VATvalues, of which only one must be specified.VATAmount is an additional fee added to each order item. Thus the total price for an order item, when VATAmount specified, is orderItemAmount= (itemPrice + VATAmount) * quantity

Example 1.
itemPrice=$150, VATAmount=$10, quantity=10
orderItemAmount = (15000 + 1000) * 10 = 160000 or $1600


VATPercent is an additional fee added to each order item, in the form of a percentage. Thus the total price for an order item, when VATPercent specified, is orderItemAmount = ROUND(itemPrice * (1 + VATPercent / 10000) * quantity)

Example 1.
itemPrice=$150, VATPercent=10%, quantity=10
orderItemAmount = ROUND(15000 * (1 + 1000 / 10000) * 10) = ROUND(165000) = 165000 or $1650.00
Example 2.
itemPrice=$110.95, VATPercent=66.66%, quantity=11
orderItemAmount = ROUND(11095 * (1 + 6666 / 10000) * 11) = ROUND(203400.197) = 203400 or $2034.00
Example 3.
itemPrice=$133.25, VATPercent=33.33%, quantity=3
orderItemAmount = ROUND(13325 * (1 + 3333 / 10000) * 3) = ROUND(53298.6675) = 53299 or $532.99


Now, we can calculate the total order amount as a sum of amounts of each order item as orderTotalAmount(N) = SUM(orderItemAmount[1], orderItemAmount[2], ..., orderItemAmount[N])
Here N is the number of order items.

Invoice payment fees:

Invoice fee is an additional fee added to invoice. It can be (optionally) provided in a form of a fixed amount value plus fee VAT percentage:invoiceFeeAmount = ROUND(invoiceFee * (1 + invoiceFeeVATPercent / 10000)) .

Example 1.
invoiceFee=15, invoiceFeeVATPercent=10%
invoiceFeeAmount = ROUND(1500 * (1 + 1000 / 10000)) = ROUND(165000) = 1650 or $16.50
Example 2.

invoiceFee=13, invoiceFeeVATPercent=33.33%
invoiceFeeAmount = ROUND(1300 * (1 + 3333 / 10000)) = ROUND(1733.29) = 1733 or $17.33


Shipping fee is an additional fee added to shipping goods. It can be (optionally) provided in a form of a fixed amount value plus fee VATpercentage: shippingFeeAmount = ROUND(shippingFee * (1 + shippingFeeVATPercent / 10000)).

Example 1.
shippingFee=15, shippingFeeVATPercent=10%
shippingFeeAmount = ROUND(1500 * (1 + 1000 / 10000)) = ROUND(165000) = 1650 or $16.50
Example 2.

shippingFee=10.95, shippingFeeVATPercent=66.66%
shippingFeeAmount = ROUND(1095 * (1 + 6666 / 10000)) = ROUND(1824.927) = 1825 or $18.25


Each of these fees increases the total amount of the order, which in the case of an invoice payment is calculated as:orderTotalAmount(N) = SUM(orderItemAmount[1], orderItemAmount[2], ..., orderItemAmount[N]) + invoiceFeeAmount + shippingFeeAmount.
Here N is the number of order items.

Testing


To activate test mode for any invoice payment method you need to send a test parameter along with the post parameters.<input type="hidden" name="test" value="foo" />.
General invoice test information can be found here.

If you cannot see the invoice payment method as an option in DIBS Payment Window when sending the test parameter it most likely means that the test functionality is not activated in DIBS backend and you should contact DIBS support according to the contact details below.
Please contact our support via one of the following links regarding any integration issues.
Denmark http://help.dibs.dk
Norway http://help.dibs.no
Sweden http://help.dibs.se


Debugging / Technical Integration Issues

Technical error: Common reasons if this error message appears is logical errors such as error in the calculation of VAT amount or total order sum. If an error occurs, you can normally find a detailed error description via a link from the error page that appears.

 
CMS - Content Management System By SiteLoom