Skip to main content

Payment web service

This section contains detailed descriptions of the input and output values that are used for normal payments. The web service for normal payments is found here: https://ssl.ditonlinebetalingssystem.dk/remote/payment.asmx

How to read the documentation

Every description of a function consists of input and output fields. Input fields are used when calling the web service. Mandatory fields must be entered, while the rest can be given as empty values. The output fields are returned by the web service.

Data flow

  1. When the customers enter their card information and complete a purchase, the payment is authorised. Using the authorize call, however, requires PCI certification. Instead, use our payment window. This means that we handle the authorisation.

  2. Use the call capture to capture the payment. When the call is completed, your acquirer transfers the captured amount from the cardholder's account to your account.

  3. If the customer returns the product or cancels the order after the payment has been captured, you can refund the amount using the credit call. The amount goes back to the cardholder's account. You can either refund the full amount or a part of the amount.

  4. If the customer returns the product or cancels the order before the payment has been captured, you can delete the payment using the delete function. The full amount is released and goes back to the cardholder's account.

Data types

The web service uses objects and data types in the SOAP format. The data types are: Integer, Long, String, Enum, Boolean and Datetime. Datetime must be formatted: "yyyy-MM-dd HH:mm:ss".

All functions return a boolean, indicating whether the operation was successful. If the returning value is false, the integer values epayresponse and pbsresponse must be used to determine the source of error.

capture

Input

InputTypeValuesDescriptionMandatory
merchantnumberInteger7 digitsYour unique merchant number. The number is located on your agreement with the acquirer (for instance Nets) or in your ePay administration.Yes
transactionidLongThe unique number to identify the payment returned during the authorisation.Yes
amountIntegerMinor unitsThe amount in minor units. DKK 125.75 must be specified as 12575 in the amount field.Yes
groupStringMax 100 characters.The group to which the payment is associated.No
invoiceStringMax 100 characters.Send invoice data to Storebox/Kvittering.dk. Find more information here.No

Output

OutputTypeValuesDescription
captureResultBooleanSee description of output values.
pbsResponseIntegerIf the capture is declined by Nets, the error code is defined in pbsresponse. If the payment is captured, the value is 0.
epayresponseIntegerIf the payment is declined by ePay, the error code is defined in epayresponse.
Output valuesIf the capture is approved, captureResult will return true. Otherwise the returning value is false. If the function call returns false, epayresponse and pbsresponse must be used to determine the source of error.

credit

Input

InputTypeValuesDescriptionMandatory
merchantnumberInteger7 digitsYour unique merchant number. The number is located on your agreement with the acquirer or in your ePay administration.Yes
transactionidLongThe unique number to identify the payment returned during the authorisation.Yes
amountIntegerMinor unitsThe amount in minor units. E.g. DKK 125.75 must be specified as 12575 in the amount field.Yes
groupStringMax. 100 characters.The group to which the payment is associated.No
invoiceStringMax 100 characters.Send invoice data to Storebox/Kvittering.dk. Find more information here.No

Output

OutputTypeValuesDescription
creditResultBooleanSee description of output values.
pbsResponseIntegerIf the credit call is declined by Nets, the error code is defined in pbsresponse. If the payment is credited, the value is 0.
epayresponseIntegerIf the credit call is declined by ePay, the error code is defined in epayresponse.
Output valuesIf the credit is approved, creditResult will return true. Otherwise the returning value is false. If the function call returns false, epayresponse and pbsresponse must be used to determine the source of error.

delete

Input

InputTypeValuesDescriptionMandatory
merchantnumberInteger7 digitsYour unique merchant number. The number is located on your agreement with the or in your ePay administration.Yes
transactionidLongThe unique number to identify the payment returned during the authorisation.Yes
groupStringMax. 100 characters.The group to which the payment is associated.No

Output

OutputTypeValuesDescription
deleteResultBooleanSee description of output values.
epayresponseIntegerIf the delete call is declined by ePay, the error code is defined in epayresponse.
Output valuesIf the delete is approved, deleteResult will return true. Otherwise the returning value is false. If the function call returns false, epayresponse and pbsresponse must be used to determine the source of error.

getEpayError

Input

InputTypeValuesDescriptionMandatory
merchantnumberInteger7 digitsYour unique merchant number. The number is located on your agreement with the acquirer or in your ePay administration.Yes
languageInteger1The language in which the result is returned
(1) for Danish
(2) for English
(3) for Swedish
Yes
payresponsecodeStringError code received from ePay in epayresponse.No

Output

OutputTypeValuesDescription
getEpayErrorResultBooleanSee description of output values.
epayResponseStringStringThe error returned as a string from ePay.
epayresponseIntegerIf the payment is declined by ePay, the error code is defined in epayresponse.
Output valuesIf it is possible to retrieve information about the error code, getEpayErrorResult will return true. Otherwise the returning value is false. If the call returns false, epayresponse must be used to determine the source of error.

getPbsError

Input

InputTypeValuesDescriptionMandatory
merchantnumberInteger7 digitsYour unique merchant number. The number is located on your agreement with the acquirer or in your ePay administration.Yes
languageInteger1The language in which the result is returned
(1) for Danish
(2) for English
(3) for Swedish
Yes
pbsresonsecodeIntegerError code received from Nets in pbsresponse.No

Output

OutputTypeValuesDescription
getPbsErrorResultBooleanSee description of output values.
pbsResponseStringStringThe error returned as string from ePay.
epayresponseIntegerIf the payment is declined by ePay, the error code is defined in epayresponse.
Output valuesIf it is possible to retrieve information about the error code, getPbsErrorResult will return true. Otherwise the returning value is false. If the call returns false, epayresponse must be used to determine the source of error.

getcardtype

Input

InputTypeValuesDescriptionMandatory
merchantnumberInteger7 digitsYour unique merchant number. The number is located on your agreement with the acquirer or in your ePay administration.Yes
cardnumberStringMax 20 charactersThe unique number to identify the payment returned during the authorisation.Yes

Output

OutputTypeValuesDescription
getcardtypeResultBooleanSee description of output values.
cardtypeidIntegerThe card type as an Integer.
cardnameStringThe name of the card type (e.g. DANKORT).
epayresponseIntegerIf the payment is declined by ePay, the error code is defined in epayresponse.
Output valuesIf it is possible to return information about the card, getcardtypeResult is true. Otherwise the value is false. If the call returns false, epayresponse must be used to determine the source of error.

gettransaction

Input

InputTypeValuesDescriptionMandatory
merchantnumberInteger7 digitsYour unique merchant number. The number is located on your agreement with the acquirer or in your ePay administration.Yes
transactionidLongMax 50 charactersThe unique number to identify the payment returned during the authorisation.Yes

Output

OutputTypeValuesDescription
groupStringGroup (if defined).
authamountIntegerThe amount authorised on the card holder's payment card.
currencyIntegerCurrency of the authorisation.
cardtypeidIntegerCardtype of the payment card used.
capturedamountIntegerAmount captured.
creditedamountIntegerAmount credited.
orderidStringOrder number
descriptionStringDescription (If defined)
authdateDatetimeDate of the authorisation.
captureddateDatetimeDate of the capture.
deleteddateDatetimeDate of the deletion.
crediteddateDatetimeDate of the credit.
statusEnum0 = PAYMENT_UNDEFINED
1 = PAYMENT_NEW
2 = PAYMENT_CAPTURED
3 = PAYMENT_DELETED
4 = PAYMENT_INSTANT_CAPTURE_FAILED
5 = PAYMENT_SUBSCRIPTION_INI
6 = PAYMENT_RENEW
7 = PAYMENT_EUROLINE_WAIT_CAPTURE
8 = PAYMENT_EUROLINE_WAIT_CREDIT
Status of the payment.
Per default,
the status is PAYMENT_NEW.
PAYMENT_EUROLINE_WAIT_CAPTURE status:
The transaction is captured at ePay and being processed by the
acquirer;
this is done overnight by batch processing.
PAYMENT_EUROLINE_WAIT_CREDIT status:
The transaction is credited at ePay and being processed by the
acquirer;
this is done overnight by batch processing.
When the payment is captured, the status is PAYMENT_CAPTURED.
[history] list start
transactionHistoryIDLongUnique ID for the history.
logonIDIntegerUnique ID for the user who performed the operation.
eventMsgStringDescription of the operation.
createdDatetimeTimestamp of the operation.
[history] list end
transactionidLongThe payment is identified by this number which is returned during authorisation.
cardholderStringName of the card holder (if defined).
modeEnumPayment type: test or production.
epayresponseIntegerIf the payment is declined by ePay, the error code is defined in epayresponse.
Output valuesIf it is possible to retrieve information about the payment, the function will return true.
Otherwise the returning value is false.
As the returning value is false, epayresponse is used to determine the source of error.

gettransactionlist

Input

InputTypeValuesDescriptionMandatory
merchantnumberInteger7 digitsYour unique merchant number. The number is located on your agreement with the acquirer or in your ePay administration.Yes
statusEnum0 = PAYMENT_UNDEFINED
1 = PAYMENT_NEW
2 = PAYMENT_CAPTURED
3 = PAYMENT_DELETED
4 = PAYMENT_INSTANT_CAPTURE_FAILED
5 = PAYMENT_SUBSCRIPTION_INI
6 = PAYMENT_RENEW
7 = PAYMENT_EUROLINE_WAIT_CAPTURE
8 = PAYMENT_EUROLINE_WAIT_CREDIT
Status of the payment. Per default, the status is PAYMENT_NEW.
PAYMENT_EUROLINE_WAIT_CAPTURE status: The transaction is captured at ePay and being processed by the acquirer; this is done overnight by batch processing.
PAYMENT_EUROLINE_WAIT_CREDIT status: The transaction is credited at ePay and being processed by the acquirer; this is done overnight by batch processing.
When the payment is captured, the status is PAYMENT_CAPTURED.
No
searchdatestartDatetimeNull (nothing) - and it is ignored.Start date (defined as: "yyyy-MM-dd TT:mm:ss").No
searchdateendDatetimeNull (nothing) - and it is ignored.End date (defined as: "yyyy-MM-dd TT:mm:ss").No
searchgroupStringMax 100 characters.Search for payments in a defined group (allowed empty).No
searchorderidStringMax 20 characters.Search for payments by order number (allowed empty).

Output

OutputTypeValuesDescription
Output valuesSee the result in gettransaction. The values are the same. However, they are enclosed in transactionInformationAry, which is an array of the type TransactionInformationType.

See specifications above: gettransaction.

getcardinfo

Input

InputTypeValues
DescriptionMandatory
merchantnumberInteger7 digitsYour unique merchant number. The number is located on your agreement with the acquirer or in your ePay administration.Yes
cardno_prefixInteger6 digitsPrefix on the payment card from which the fee is calculated. It is important that only the first six digits are defined - otherwise the system will reject the call.

Note that Danske Bank, Nordea must use the prefixes below:

000022 eller 000023 = Danske Bank Netbetaling

000021 = Nordea e-betaling
Yes
amountIntegerMinor unitsThe amount in minor units. For instance, DKK 125.75 must be specified as 12575 in the amount field.Yes
currencyInteger208 = DKK
978 = EUR
840 = USD
578 = NOK
752 = SEK
826 = GBP
The currency of the payment. If the customer must be settled in Danish kroner, then put the value at 208. For a complete list of currency codes, please click here.Yes
acquirerIntegerNets/Teller = 1
Euroline = 2
BABS Swedbank = 8
Nordea SE = 21
Handelsbanken SE = 23
Elavon = 24
EVRY Swedbank = 25
EVRY ePay = 26
EVRY Teller = 27
Nordea DK = 29
Nordea NO = 30
Nordea FI = 31
Handelsbanken DK = 32
Handelsbanken NO = 33
Handelsbanken FI = 34
Clearhaus = 37
The acquirer which handles the transaction.No

Output

OutputTypeValues
Description
feeIntegerMinor unitsThe transaction fee is calculated based on the value of the input fields amount, currency, and acquirer.
cardtypeInteger1 = Dankort
2 = Visa/Dankort
3 = Visa/Electron (foreign)
4 = Mastercard
5 = Mastercard (foreign)
6 = Visa Electron
7 = JCB
8 = Diners Club
9 = Maestro
10 = America Express
11 = Ukendt
13 = Diners Club (foreign)
14 = American Expres (foreign)
15 = Maestro (foreign)
16 = Forbrugsforeningen
17 = ewire
18 = Visa
19 = IKANO
20 = Andre
21 = Nordea e-betaling
22 = Danske Netbetaling
23 = BG Netbetalinger
24 = MasterCard
25 = MasterCard (foreign)
26 = PayPal
27 = Mobilpenge
28 = Klarna
29 = Svea
30 = SEB Direktbetalning
31 = Nordea SE e-payment
32 = Handelsbanken SE e-payment
33 = Swedbank Direktbetalning
34 = ViaBill
35 = Beeptify
36 = iDeal
37 = Oberthur
38 = Paii
39 = Brandts
40 = MobilePay
41 = Resurs
42 = Ekspres Bank
Type of credit card used for the payment.
cardtypetextStringType of card in a reader-friendly format.
epayresponseIntegerIf ePay declines the call to the API (the value returned is false), you can find the source of error in this parameter. For a full list of error codes, go to your ePay administration in the menu Support -> System error codes.

move_as_captured

Input

InputTypeValuesDescriptionMandatory
merchantnumberInteger7 digitsYour unique merchant number. The number is located on your agreement with the acquirer or in your ePay administration.Yes
transactionidLongThe unique number to identify the payment returned during the authorisation.Yes
groupStringMax. 100 characters.The group to which the payment is associated.No

Output

OutputTypeValuesDescription
epayresponseIntegerIf the payment is declined by ePay, the error code is defined in epayresponse.

Troubleshooting

All deviations from the system are stored in a separate log at ePay's which is accessed from the ePay administration. If you experience problems when calling the web service, information for troubleshooting (debugging) is available in this log.

The log is located in your ePay administration in the menu API/Web services -> Remote log. All error codes are available in Support -> System error codes and Support -> Error codes from PBS.