Please wait ...


Loading...

Subscription web service

Technical documentation for the subscription web service

The following is a detailed description of the input and output values for the subscription web service, which handles subscriptions. The web service for subscriptions is found here:

https://ssl.ditonlinebetalingssystem.dk/remote/subscription.asmx

How to read the documentation

Every description of a function consists of input and output fields. Input fields are all the fields the web service expects you to set as you call it. Mandatory fields must be entered - the rest can be empty values. The output fields are the ones returned by the web service.

Dataflow

1. CreateSubscription - requires PCI certification. Instead, use our payment window or a payment request (by saving the payment card).

2. When the subscription is created, you can do ordinary authorisations on the subscription by using the authorize function. Here the card holder’s credit card is validated (and stored in Bambora's system), and a payment is created. When the payment is created, you must process it by using the webservice payment.asmx, which handles normal payments (capture, credit, delete). You can use authorize as often as needed, and you choose the amount yourself.

3. If a customer wants to quit his/her subscription, the DeleteSubscription must be called, and Bambora deletes the subscription.

authorize

The input fields are the fields you have to send when you're calling the web service.

InputTypeValuesDescriptionMandatory
merchantnumberInteger7 digitsYour unique merchant number. The number is located on your agreement with the acquirer or in your Bambora administration.Yes
subscriptionidLong
The unique number that identifies the subscriber.Yes
orderidStringMax 20 characters. (Nets recommends that the order ID is 8 digits max. Numbers from 0-9)The order ID from your own system. Used as a reference between your system and Bambora.Yes
amount
IntegerUse minor unitsThe amount in minor units. E.g. DKK 125.75 must be specified as 12575 in the amount field.Yes
currency
String208 = DKK 
978 = EUR 
840 = USD
The currency of the transaction. See all currency codes here.Yes
instantcapture
Integer0 = Manually
1 = Automatically
If you put this at 1, the payment is captured automatically. By default, it is set at 0 and you have to capture the payment from the Bambora administration or through our API/web service.Yes
group
StringMax 100 characters.The group to which the payment is associated.No
description
StringMax 1024 characters.A description of the payment. You can see it in your Bambora administration.No
email
StringMax 100 characters.If you enter an email address here, you'll receive an email when the payment is authorised. This is NOT for your customer's order confirmation.
No
sms
StringMax 8 characters.If you enter a mobile phone number here, you'll receive an SMS containing information about the payment. It costs DKK 0.25 per SMS.
No
ipaddress
StringMax 15 characters.Card holder's IP address. This is used by Fraud Fighter.
No

The output fields which are returned by the web service.

OutputTypeValuesDescription
authorizeResultBooleanSee description of output values.
transactionidLongThe unique number which identifies the payment. It is returned at authorisation.
pbsresponseIntegerIf Nets rejects the capture, you can find the error code here. If the capture is successful, the value is 0.
epayresponseIntegerIf Bambora rejects the capture, you can find the error code in epayresponse.
Output valuesIf the payment is successful, authorizeResult is returned as true. If not, the value is false. When you get a false, you can use epayresponse and pbsresponse to determine the source of error. If, for instance, this function returns a false, and epayresponse is (-1) and pbsresponse is 118, the reason is that Nets declined the payment because they don't recognise the card number. But if the function returns a false, and epayresponse is (-1002), it's because Bambora doesn't recognise the merchant number.

deletesubscription

The input fields are the fields you have to send when you're calling the web service.

InputTypeValuesDescriptionMandatory
merchantnumberInteger7 digitsYour unique merchant number. The number is located on your agreement with the acquirer or in your Bambora administration.
Yes
subscriptionidLong
The unique number which identifies the subscriber.Yes

The output fields which are returned by the web service.

OutputTypeValuesDescription
deletesubscriptionResultBooleanSee description of output values.
epayresponseIntegerIf Bambora rejects the deletion, you can find the error code in epayresponse.
Output valuesIf the subscription is deleted, deletesubscriptionResult is returned as true. If not, the value is false. When the value is false, please use epayresponse to determine the source of error.

getEpayError

The input fields are the fields you have to send when you're calling the web service.

InputTypeValuesDescriptionMandatory
merchantnumberInteger7 digitsYour unique merchant number. The number is located on your agreement with the acquirer or in your Bambora administration.Yes
languageInteger1The labguage in which the result is returned:
(1) for Danish
(2) for English
(3) for Swedish
Yes
epayresponsecodeInteger
The error code you receive from Nets in pbsresponse.No

The output fields which are returned by the web service.

OutputTypeValuesDescription
getEpayErrorResultBooleanSee description of output values.
epayResponseStringStringThe error returned as a string from Bambora.
epayresponseIntegerIf Bambora rejects the call, you can find the error code in epayresponse.
Output valuesIf it is possible to retrieve information about the error code, getEpayErrorResult is returned as true. If not, the returned value is false. When the returned value is false, epayresponse must be used to determine the source of error.

getPbsError

The input fields are the fields you have to send when you're calling the web service.

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

The output fields which are returned by the web service.

OutputTypeValuesDescription
getPbsErrorResultBooleanSee description of output values.
pbsResponseStringStringThe error returned as a string from Bambora.
epayresponseIntegerIf Bambora rejects the call, you can find the error code in epayresponse.
Output valuesIf it is possible to retrieve information about the error code, getPbsErrorResult is returned as true. If not, the returned value is false. When the returned value is false, epayresponse must be used to determine the source of error.

getsubscriptions

The input fields are the fields you have to send when you're calling the web service.

InputTypeValuesDescriptionMandatory
merchantnumberInteger7 digitsYour unique merchant number. The number is located on your agreement with the acquirer or in your Bambora administration).
Yes
subscriptionidLong
The unique number which identifies the subscriber. If this value is put at 0, all created subscriptions are returned. If the value is > 0, only the subscription matching the ID is returned.
Yes

The output fields returned by the web service.

OutputTypeValuesDescription
getsubscriptionsResultBooleanSee description of output values.
subscriptionAryAn array of the type SubscriptionInformationType. The object consists of the following elements: subscriptionid, description, created and transactionList, which is an array containing payments completed on the subscription.

subscriptionidLongThe unique number which identifies the subscription.
descriptionStringMax 1024 charactersDescription of the payment. You can find the description on the payment in the Bambora administration.
createdDatetimeThe time stamp for the creation of the subscription.
transactionListTransactionInformationTypeAn array of type TransactionInformationType. Find information about his type in the gettransactionlist for ordinary payments.
Output valuesIf it's possible to retrieve a list of subscriptions, the value is returned as true. If not, the returned value is false. When the value is returned as false, please use epayresponse to determine the source of error.

Troubleshooting

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

The log is located in your Bambora 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.