Search:     Advanced search

Technical documentation for ePay Subscription Webservice

Article ID: 24
Last updated: 02 Aug, 2011
Views: 1937

Following is a detailed description of the input and output values for the subscription webservice, which handles subscriptions. The webservice for subscriptions is to be found here:

How to read the documentation

Every description of a function consists of input and output. Input is all the fields the webservice expects you to set as you call it. Fields given by BOLD are mandatory the rest can be given as empty values. The output fields are the ones which the webservice returns.

Dataflow

  • "CreateSubscription" - Requires PCI certification. Instead of use one of the following two solutions:
    Standard Payment window
    or own payment form.
  • As the subscription is created you can do ordinary authorizations on the subscription by use of the "Authorize" function. Here the cardholder’s credit card is validated (which is stored into the ePay system) and a payment is created to PBS. As the payment is created it must be handled by use of the webservice payment.asmx, which handles normal payments (Capture, Credit, Delete).
    "Authorize" can be done as often as needed and you choose the amount yourself.
  • As a customer want to quit his/her subscription the "DeleteSubscription" must be called, where ePay ensures to delete the subscrioption.

Authorize


Input Datatype Values Description
Merchantnumber Integer 7 digits The unique merchant number which is created in ePay. The merchant number is located on your agreement with the acquirer (eg. PBS).
Subscriptionid Long   The unique number to identify the subscription.
Orderid String Max. 20 characters
(PBS anbefaler dog at ordreID'et er på max. 8 cifre - tal fra 0-9)
The order id from your own system. This order id is used as reference between your own system and ePay.

Any numbers from 0-9 and characters from a-Z is allowed.
Amount Integer Angives i minor units The amount in minor units. Eg. DKK 125,75 must be specified as 12575 in the amount field.
Currency String 208 = DKK
978 = EUR
840 = USD

Currency of the amount.
See complete list here

Instantcapture Integer 0 = manuel

1 = automatic
If this field is set to 1 the payment is captured instantly. As standard this value is set to 0 and you must either capture the payment from the administration of the website or by the API / remote interface.
Group String Max. 100 characters Which group the payment will be associated to.
Description String Max. 1024 characters Description of the payment. This description can be seen in the administration in ePay.
Email String Max. 100 characters If you set the e-mail field and e-mail will automatically be sent to the address as the payment has been authorized.
SMS String Max. 8 characters If a mobile number is set in this field a SMS will be send with information about the payment.
DKK 0,25 pr. SMS.
IpAddress String Max. 15 characters IP address of the cardholder. This feature is used for fraudcontrol.
OutPut Datatype Values Description
authorizeResult Boolean   See description of output values.
Transactionid Long   The unique number to identify the payment returned during the authorization.
Pbsresponse Integer   If PBS declines the capture the error code is defined in pbsresponse. If the payment is captured this value is 0.
epayresponse Integer   If ePay declines the payment the error code is defined in epayresponse.
Output values If the payment is approved authorizeResult will return true. Everything else will result in a false value. As the function returns false the parameters epayresponse and pbsresponse must be used to identify the reason. E.g. if this function returns false and epayresponse is (-1) (standard value) and pbsresponse is 118 it means that PBS declined the payment because they don’t know the card number. However if the function returns false and epayresponse has the value (-1002) it means that ePay does not know the merchant number used.

Deletesubscription
Input Datatype Values Description
Merchantnumber Integer 7 digits The unique merchant number which is created in ePay. The merchant number is located on your agreement with the acquirer (eg. PBS).
Subscriptionid Long   The unique number to identify the subscription.
OutPut Datatype Values Description
deletesubscriptionResult Boolean   See description of output values.
epayresponse Integer   If ePay declines the payment the error code is defined in epayresponse.
Output values If the subscription is deleted deletesubscriptionResult returns true. Otherwise the return value is false. If the return value is false the epayresponse must be used to find out the reason why the subscription could not be deleted.

GetEpayError
Input Datatype Values Description
Merchantnumber Integer 7 digits The unique merchant number which is created in ePay. The merchant number is located on your agreement with the acquirer (eg. PBS).
Language Integer 1

Which language the result will be returned in
(1) for Danish
(2) for English
(3) for Swedish

Epayresponsecode Integer   Error code received from PBS in the pbsresponse.
OutPut Datatype Values Description
getEpayErrorResult Boolean   See description of output values.
epayResponseString String   The error returned as string from ePay.
epayresponse Integer   If ePay declines the payment, the error code is defined in epayresponse.
Output values If it is possible to retrieve information about the error code, the getPbsErrorResult will return true. Otherwise the returning value is false. If the call returns false epayresponse has to be used to find out the reason why.

GetPbsError
Input Datatype Values Description
Merchantnumber Integer 7 digits The unique merchant number which is created in ePay. The merchant number is located on your agreement with the acquirer (eg. PBS).
Language Integer 1

Which language the result will be returned in
(1) for Danish
(2) for English
(3) for Swedish

pbsresponsecode Integer   Error code received from PBS in the pbsresponse.
OutPut Datatype Values Description
getPbsErrorResult Boolean   See description of output values.
pbsResponseString String   The error returned as string from ePay.
epayresponse Integer   If ePay declines the function call the error code is returned into epayresponse..
Output values If it is possible to retrieve information about the error code, the getPbsErrorResult will return true. Otherwise the returning value is false. If the call returns false epayresponse has to be used to find out the reason why.

GetSubscriptions
Input Datatype Values Description
Merchantnumber Integer 7 digits The unique merchant number which is created in ePay. The merchant number is located on your agreement with the acquirer (eg. PBS).
subscriptionid Long   The unique number to identify a subscription. If this value is set to 0 all created and active subscriptions are returned. However if the value is > 0 the single subscription found will be returned.
OutPut Datatype Values Description
getsubscriptionsResult Boolean   See description of output values.
subscriptionAry An array of type SubscriptionInformationType. A SubscriptionInformationType object consists of following elements, which are described below: subscriptionid, description, created and an array of payments completed for the subscription in an array of type transactionList.
subscriptionid Long   The unique number to identify a subscription.
description String Max. 1024 characters Description of the payment. The description is to be found for the payment in the ePay administration.
created dateTime   Creation time of the subscription.
transactionList TransactionInformationType   An array of type TransactionInformationType. Information about his type is to be found in the section: gettransactionlist for ordinary payments.
Output values Is it possible to retrieve a list of subscriptions the function returns true. Otherwise the returning value is false. As the function returns false the epayresponse is to be used to find out what the reason was.

This article was:   Helpful | Not Helpful
Also read
document How to implement subscriptions using .NET (C-SHARP)
document How to implement recurring payments using ASP
document How to implement recurring payments using PHP
document Recurring payments

Prev   Next
Subscription Webservice     Troubleshooting