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.
mscBooleanWas the payment completed with 3D Secure
fraudStatusInteger0 = false
1 = true
Indicator of potential fraud
FraudMessageStringProvides a textual description of possible fraud reasons
payerCountryCodeStringThe country the payer is from
issuedCountryCodeStringThe country where the card was issued
feeIntegerThe fee charged to the customer (in minor units)
InsplitpaymentBooleanIndicates if the payment can be split into multiple transactions
tcardnoStringTruncated card number
expmonthIntegerThe expiration month
expyearIntegerThe expiration year
acquirerEnumUNKNOWN
PBS
DANSKE_BANK
NORDEA
SWEDBANK
PAYPAL
BABS_SWEDBANK
HANDELSBANKEN
SEB_DIREKT
SWEDBANK_DIREKT
IBILL
IDEAL
OBETUR
EVRY_NORDEA_SE
EVRY_NORDEA_DK
EVRY_NORDEA_NO
EVRY_NORDEA_FI
EVRY_HANDELSBANKEN_SE
EVRY_HANDELSBANKEN_DK
EVRY_HANDELSBANKEN_NO
EVRY_HANDELSBANKEN_FI
EVRY_ELAVON
EVRY_SWEDBANK
CLEARHAUS
RESURS_BANK
EKSPRES_BANK
BAMBORA
EPAY
The entity processing the payment
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.

gettransactionsbyorderid

Input

InputTypeValuesDescriptionMandatory
merchantnumberstringAny valid merchant numberThe unique ID for the merchantYes
orderidstringAny valid order IDThe ID of the order to queryYes
pwdstringMerchant's passwordThe password for authenticationNo
transactionidsarrayArray of long valuesArray of transaction IDs (optional)No
epayresponseint0 or error codeResponse code for the requestNo

Output

OutputTypeValuesDescription
gettransactionsbyorderidResultbooleantrue/falseIndicates whether the operation was successful
transactionidsarrayArray of long valuesList of transaction IDs associated with the order
epayresponseint0 or error codeResponse code for the request

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.