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
-
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.
-
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.
-
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.
-
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
Input | Type | Values | Description | Mandatory |
---|---|---|---|---|
merchantnumber | Integer | 7 digits | Your unique merchant number. The number is located on your agreement with the acquirer (for instance Nets) or in your ePay administration. | Yes |
transactionid | Long | The unique number to identify the payment returned during the authorisation. | Yes | |
amount | Integer | Minor units | The amount in minor units. DKK 125.75 must be specified as 12575 in the amount field. | Yes |
group | String | Max 100 characters. | The group to which the payment is associated. | No |
invoice | String | Max 100 characters. | Send invoice data to Storebox/Kvittering.dk. Find more information here. | No |
Output
Output | Type | Values | Description |
---|---|---|---|
captureResult | Boolean | See description of output values. | |
pbsResponse | Integer | If the capture is declined by Nets, the error code is defined in pbsresponse. If the payment is captured, the value is 0. | |
epayresponse | Integer | If the payment is declined by ePay, the error code is defined in epayresponse. | |
Output values | If 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
Input | Type | Values | Description | Mandatory |
---|---|---|---|---|
merchantnumber | Integer | 7 digits | Your unique merchant number. The number is located on your agreement with the acquirer or in your ePay administration. | Yes |
transactionid | Long | The unique number to identify the payment returned during the authorisation. | Yes | |
amount | Integer | Minor units | The amount in minor units. E.g. DKK 125.75 must be specified as 12575 in the amount field. | Yes |
group | String | Max. 100 characters. | The group to which the payment is associated. | No |
invoice | String | Max 100 characters. | Send invoice data to Storebox/Kvittering.dk. Find more information here. | No |
Output
Output | Type | Values | Description |
---|---|---|---|
creditResult | Boolean | See description of output values. | |
pbsResponse | Integer | If the credit call is declined by Nets, the error code is defined in pbsresponse. If the payment is credited, the value is 0. | |
epayresponse | Integer | If the credit call is declined by ePay, the error code is defined in epayresponse. | |
Output values | If 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
Input | Type | Values | Description | Mandatory |
---|---|---|---|---|
merchantnumber | Integer | 7 digits | Your unique merchant number. The number is located on your agreement with the or in your ePay administration. | Yes |
transactionid | Long | The unique number to identify the payment returned during the authorisation. | Yes | |
group | String | Max. 100 characters. | The group to which the payment is associated. | No |
Output
Output | Type | Values | Description |
---|---|---|---|
deleteResult | Boolean | See description of output values. | |
epayresponse | Integer | If the delete call is declined by ePay, the error code is defined in epayresponse. | |
Output values | If 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
Input | Type | Values | Description | Mandatory |
---|---|---|---|---|
merchantnumber | Integer | 7 digits | Your unique merchant number. The number is located on your agreement with the acquirer or in your ePay administration. | Yes |
language | Integer | 1 | The language in which the result is returned (1) for Danish (2) for English (3) for Swedish | Yes |
payresponsecode | String | Error code received from ePay in epayresponse. | No |
Output
Output | Type | Values | Description |
---|---|---|---|
getEpayErrorResult | Boolean | See description of output values. | |
epayResponseString | String | The error returned as a string from ePay. | |
epayresponse | Integer | If the payment is declined by ePay, the error code is defined in epayresponse. | |
Output values | If 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
Input | Type | Values | Description | Mandatory |
---|---|---|---|---|
merchantnumber | Integer | 7 digits | Your unique merchant number. The number is located on your agreement with the acquirer or in your ePay administration. | Yes |
language | Integer | 1 | The language in which the result is returned (1) for Danish (2) for English (3) for Swedish | Yes |
pbsresonsecode | Integer | Error code received from Nets in pbsresponse. | No |
Output
Output | Type | Values | Description |
---|---|---|---|
getPbsErrorResult | Boolean | See description of output values. | |
pbsResponseString | String | The error returned as string from ePay. | |
epayresponse | Integer | If the payment is declined by ePay, the error code is defined in epayresponse. | |
Output values | If 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
Input | Type | Values | Description | Mandatory |
---|---|---|---|---|
merchantnumber | Integer | 7 digits | Your unique merchant number. The number is located on your agreement with the acquirer or in your ePay administration. | Yes |
cardnumber | String | Max 20 characters | The unique number to identify the payment returned during the authorisation. | Yes |
Output
Output | Type | Values | Description |
---|---|---|---|
getcardtypeResult | Boolean | See description of output values. | |
cardtypeid | Integer | The card type as an Integer. | |
cardname | String | The name of the card type (e.g. DANKORT). | |
epayresponse | Integer | If the payment is declined by ePay, the error code is defined in epayresponse. | |
Output values | If 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
Input | Type | Values | Description | Mandatory |
---|---|---|---|---|
merchantnumber | Integer | 7 digits | Your unique merchant number. The number is located on your agreement with the acquirer or in your ePay administration. | Yes |
transactionid | Long | Max 50 characters | The unique number to identify the payment returned during the authorisation. | Yes |
Output
Output | Type | Values | Description |
---|---|---|---|
group | String | Group (if defined). | |
authamount | Integer | The amount authorised on the card holder's payment card. | |
currency | Integer | Currency of the authorisation. | |
cardtypeid | Integer | Cardtype of the payment card used. | |
capturedamount | Integer | Amount captured. | |
creditedamount | Integer | Amount credited. | |
orderid | String | Order number | |
description | String | Description (If defined) | |
authdate | Datetime | Date of the authorisation. | |
captureddate | Datetime | Date of the capture. | |
deleteddate | Datetime | Date of the deletion. | |
crediteddate | Datetime | Date of the credit. | |
status | Enum | 0 = 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 | --- | --- | --- |
transactionHistoryID | Long | Unique ID for the history. | |
logonID | Integer | Unique ID for the user who performed the operation. | |
eventMsg | String | Description of the operation. | |
created | Datetime | Timestamp of the operation. | |
[history] list end | --- | --- | --- |
transactionid | Long | The payment is identified by this number which is returned during authorisation. | |
cardholder | String | Name of the card holder (if defined). | |
mode | Enum | Payment type: test or production. | |
msc | Boolean | Was the payment completed with 3D Secure | |
fraudStatus | Integer | 0 = false 1 = true | Indicator of potential fraud |
FraudMessage | String | Provides a textual description of possible fraud reasons | |
payerCountryCode | String | The country the payer is from | |
issuedCountryCode | String | The country where the card was issued | |
fee | Integer | The fee charged to the customer (in minor units) | |
Insplitpayment | Boolean | Indicates if the payment can be split into multiple transactions | |
tcardno | String | Truncated card number | |
expmonth | Integer | The expiration month | |
expyear | Integer | The expiration year | |
acquirer | Enum | UNKNOWN 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 |
epayresponse | Integer | If the payment is declined by ePay, the error code is defined in epayresponse. | |
Output values | If 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
Input | Type | Values | Description | Mandatory |
---|---|---|---|---|
merchantnumber | string | Any valid merchant number | The unique ID for the merchant | Yes |
orderid | string | Any valid order ID | The ID of the order to query | Yes |
pwd | string | Merchant's password | The password for authentication | No |
transactionids | array | Array of long values | Array of transaction IDs (optional) | No |
epayresponse | int | 0 or error code | Response code for the request | No |
Output
Output | Type | Values | Description |
---|---|---|---|
gettransactionsbyorderidResult | boolean | true/false | Indicates whether the operation was successful |
transactionids | array | Array of long values | List of transaction IDs associated with the order |
epayresponse | int | 0 or error code | Response code for the request |
getcardinfo
Input
Input | Type | Values | Description | Mandatory |
---|---|---|---|---|
merchantnumber | Integer | 7 digits | Your unique merchant number. The number is located on your agreement with the acquirer or in your ePay administration. | Yes |
cardno_prefix | Integer | 6 digits | Prefix 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 |
amount | Integer | Minor units | The amount in minor units. For instance, DKK 125.75 must be specified as 12575 in the amount field. | Yes |
currency | Integer | 208 = 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 |
acquirer | Integer | Nets/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
Output | Type | Values | Description |
---|---|---|---|
fee | Integer | Minor units | The transaction fee is calculated based on the value of the input fields amount, currency, and acquirer. |
cardtype | Integer | 1 = 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. |
cardtypetext | String | Type of card in a reader-friendly format. | |
epayresponse | Integer | If 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
Input | Type | Values | Description | Mandatory |
---|---|---|---|---|
merchantnumber | Integer | 7 digits | Your unique merchant number. The number is located on your agreement with the acquirer or in your ePay administration. | Yes |
transactionid | Long | The unique number to identify the payment returned during the authorisation. | Yes | |
group | String | Max. 100 characters. | The group to which the payment is associated. | No |
Output
Output | Type | Values | Description |
---|---|---|---|
epayresponse | Integer | If 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
.