Skip to main content

API for payment requests

A payment request is a link which opens the payment window. You can insert the link into an email and send the email directly to customers. As such, you request a payment from them.

This section describes our API for payment requests. All functions, methods, input and output values are outlined here.

You can find our webservice for payment requests here: https://paymentrequest.api.epay.eu/v1/

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.

The flow of a payment request

A payment request will normally pass through these four steps.

  • Step 1: You create a payment request using createpaymentrequest.
Notice

To add forms to the payment request, you have to call createform first and attach the formid that's returned to the payment request by sending it as a parameter when you call createpaymentrequest.

  • Step 2: You can send the payment request with sendpaymentrequest, or you can send the link that's returned from createpaymentrequest to the customer by other means.

  • Step 3: The customer completes the payment.

  • Step 4: The transaction ID of the payment (transactionid) is automatically connected to the ID of the payment request (paymentrequestid) if you use our payment window or send the link directly to the customer. You can use gettransaction to see all transactions carried out on the payment request.

If you use another means, you can use addtransaction to connect the transaction ID to the payment request ID.

Methods for paymentrequest

The following section describes the methods for managing payment requests.

createpaymentrequest

This is an overview of available parameters.

You'll find detailed specifications for each parameter under Specifications

You can find the API reference here: https://paymentrequest.api.epay.eu/v1/Operations.aspx?uri=createpaymentrequest

Input

InputValuesDescriptionMandatory
authentication.merchantnumberType: stringYour unique merchant number. You can find it on your merchant agreement.Yes
authentication.passwordType: stringYour password. Find it on your ePay account.Yes
languageType: stringIndicate in which language you want to receive error messages.No
localtimezoneType: booleanTrue = local timeNo
paymentrequest.exactclosedateType: DatetimeSpecify a closing date for the payment request.No
paymentrequest.closeafterxpaymentsType: integerSpecify the number of payments to be completed before the payment request closes.No
referenceType: stringReference to the payment request. It's a reference that you create and assign to the payment requestYes
paymentrequest.parametersType: Parameters (PaymentRequest)An object containing the attributes to the Payment Window.Yes

Output

OutputValuesDescription
paymentrequestidType: longThe unique number identifying the payment request.
key (paymentrequest)Type: stringKey which is used for finding the payment request. This is a security measurement to avoid that payment requests can be found using only paymentrequestid.
link (paymentrequest)Type: stringURL for the payment request
resultType: booleanSee description of output values.
messageType: stringIf result is false, message will show a detailed error description.
reasonType: enum
requestresponselogidType: longThis is only included for test accounts or if an error occured (result is false).
Output valuesIf the call was successful, result is returned as true. If not, the returning value is false. When false is returned, please use message to detect the source of error.

getpaymentrequest

getpaymentrequest fetches information about a payment request based on paymentrequestid.

Input

InputTypeObjecttypeValuesDescriptionMandatory
merchantnumberStringauthenticationYour unique merchant number. You can find it on your merchant agreement.Yes
passwordStringauthenticationYour password. Find it on your ePay account.Yes
paymentrequestidLongpaymentrequestThe unique number identifying the payment request.Yes
languageStringIndicate in which language you want to receive error messages.No
localtimezoneBooleanTrue/falseTrue = local timeNo

Output

OutputTypeValuesDescription
closeafterxpayments (paymentrequest)IntegerThe number of payments that can be completed before the payment request will close.
exactclosedate (paymentrequest)DatetimeThe date when the payment request will close.
key (paymentrequest)StringKey which is used for finding the payment request. This is a security measurement to avoid that payment requests can be found using only paymentrequestid.
link (paymentrequest)StringURL for the payment request
referenceStringReference to the payment request
statusEnum1 = Open
2 = Closed
3 = Archived
parameters - click here to see all parameters (JSON body).
The technical documentation for parameters is available here.
resultBooleanSee description of output values.
messageStringIf result is false, message will show a detailed error description.
reasonEnum
requestresponselogidLongThis is only included for test accounts or if an error occured (result is false).
Output valuesIf the call was successful, result is returned as true. If not, the returning value is false. When false is returned, please use message to detect the source of error.

listpaymentrequest

listpaymentrequest fetches a list containing information about payment requests.

Input

InputTypeObjecttypeValuesDescriptionMandatory
merchantnumberStringauthenticationYour unique merchant number. You can find it on your merchant agreement.Yes
passwordStringauthenticationYour password. Find it on your ePay account.Yes
sortingEnumsorting0 = ascending
1 = descending
State which sort order to use on the list, based on the date of creation.No
exclusivestartkeyLongpagingThe paymentrequestid from which the fetch should start.
Note: This is not included in the fetch.
No
pagesizeIntegerpaging20-100The size of the list to be fetched.No
languageStringIndicate in which language you want to receive error messages.No
localtimezoneBooleanTrue/falseTrue = local timeNo

Output

OutputTypeValuesDescription
paymentrequestid (paymentrequestlist)LongThe unique number identifying the payment.
amount (transactionlist)InteherThe amount of the payment request
created (transactionlist)DatetimeDate of creation
currency (transactionlist)StringThe currency of the payment request
numberoftransactions (transactionlist)IntegerThe number of transactions on the payment request
key (transactionlist)StringKey which is used for finding the payment request. This is a security measurement to avoid that payment requests can be found using only paymentrequestid.
link (transactionlist)StringURL for the payment request
reference (transactionlist)StringReference to the payment request
pagesize (paging)IntegerThe size of the fetched list
lastevaluatedkeyLongThe transactionid which was added most recently.
resultBooleanSee description of output values.
messageStringIf result is false, message will show a detailed error description.
reasonEnum0 = OK
1 = Error
requestresponselogidLongThis is only included for test accounts or if an error occured (result is false).
Output valuesIf the call was successful, result is returned as true. If not, the returning value is false. When false is returned, please use message to detect the source of error.

deletepaymentrequest

deletepaymentrequest deletes a payment request.

Input

InputTypeObjecttypeValuesDescriptionMandatory
merchantnumberStringauthenticationYour unique merchant number. You can find it on your merchant agreement.Yes
passwordStringauthenticationYour password. Find it on your ePay account.Yes
paymentrequestidLongpaymentrequestThe unique number identifying the payment request.Yes

Output

OutputTypeValuesDescription
resultBooleanSee description of output values.
messageStringIf result is false, message will show a detailed error description.
reasonEnum0 = OK
1 = Error
requestresponselogidLongThis is only included for test accounts or if an error occured (result is false).
Output valuesIf the call was successful, result is returned as true. If not, the returning value is false. When false is returned, please use message to detect the source of error.

sendpaymentrequest

sendpaymentrequest sends the payment request.

Input

InputTypeObjecttypeValuesDescriptionMandatory
merchantnumberStringauthenticationYour unique merchant number. You can find it on your merchant agreement.Yes
passwordStringauthenticationYour password. Find it on your ePay accountYes
nameStringrecipientThe name of the recipient of the payment requestYes
emailaddressStringrecipientValid emailThe recipient's email addressYes
requesterStringemailSpecify to add a "sent from" name in the emailNo
commentStringemailSpecify to add a comments field in the emailNo
nameStringreplytoSpecify a name to be used when replying to the email with the payment requestNo
emailaddressStringreplytoValid emailSpecify an email address to be used when replying to the email with the payment requestNo
paymentrequestidLongpaymentrequestThe unique number identifying the payment request.Yes

Output

OutputTypeValuesDescription
resultBooleanSee description of output values.
messageStringIf result is false, message will show a detailed error description.
reasonEnum0 = OK
1 = Error
requestresponselogidLongThis is only included for test accounts or if an error occured (result is false).
Output valuesIf the call was successful, result is returned as true. If not, the returning value is false. When false is returned, please use message to detect the source of error.

closepaymentrequest

closepaymentrequest closes the payment request.

Input

InputTypeObjecttypeValuesDescriptionMandatory
merchantnumberStringauthenticationYour unique merchant number. You can find it on your merchant agreement.Yes
passwordStringauthenticationYour password. Find it on your ePay accountYes
paymentrequestidLongpaymentrequestThe unique number identifying the payment request.Yes

Output

OutputTypeValuesDescription
resultBooleanSee description of output values.
messageStringIf result is false, message will show a detailed error description.
reasonEnum0 = OK
1 = Error
requestresponselogidLongThis is only included for test accounts or if an error occured (result is false).
Output valuesIf the call was successful, result is returned as true. If not, the returning value is false. When false is returned, please use message to detect the source of error.

Methods for transaction

addtransaction

addtransaction adds a transaction to the payment request.

Input

InputTypeObjecttypeValuesDescriptionMandatory
merchantnumberStringauthenticationYour unique merchant number. You can find it on your merchant agreement.Yes
passwordStringauthenticationYour password. Find it on your ePay account.Yes
paymentrequestidLongpaymentrequestThe unique number identifying the payment request.Yes
transactionidLongtransactionThe unique number identifying the transaction.Yes
languageStringIndicate in which language you want to receive error messages.No
localtimezoneBooleanTrue/falseTrue = local timeNo

Output

OutputTypeValuesDescription
resultBooleanSee description of output values.
messageStringIf result is false, message will show a detailed error description.
reasonEnum0 = OK
1 = Error
requestresponselogidLongThis is only included for test accounts or if an error occured (result is false).
Output valuesIf the call was successful, result is returned as true. If not, the returning value is false. When false is returned, please use message to detect the source of error.

gettransaction

gettransaction fetches transaction information based on paymentrequestid and transactionid.

Input

InputTypeObjecttypeValuesDescriptionMandatory
merchantnumberStringauthenticationYour unique merchant number. You can find it on your merchant agreement.Yes
passwordStringauthenticationYour password. Find it on your ePay account.Yes
paymentrequestidLongpaymentrequestThe unique number identifying the payment request.Yes
transactionidLongtransactionThe unique number identifying the transaction.Yes
languageStringIndicate in which language you want to receive error messages.No
localtimezoneBooleanTrue/falseTrue = local timeNo

Output

OutputTypeValuesDescription
transactionidIntegerThe unique number identifying the transaction.
createdDatetimeDate of creation
name (inputlist)StringInput name
value (inputlist)StringInput value
resultBooleanSee description of output values.
messageStringIf result is false, message will show a detailed error description.
reasonEnum0 = OK
1 = Error
requestresponselogidLongThis is only included for test accounts or if an error occured (result is false).
Output valuesIf the call was successful, result is returned as true. If not, the returning value is false. When false is returned, please use message to detect the source of error.

listtransaction

listtransaction fetches a list containing information about payment requests based on paymentrequestid.

Input

InputTypeObjecttypeValuesDescriptionMandatory
merchantnumberStringauthenticationYour unique merchant number. You can find it on your merchant agreement.Yes
passwordStringauthenticationYour password. Find it on your ePay account.Yes
paymentrequestidLongpaymentrequestThe unique number identifying the payment request.Yes
sortingEnumsorting0 = ascending
1 = descending
State which sort order to use on the list, based on the date of creation.No
exclusivestartkeyLongpagingThe transactionid from which the fetch should start.
Note: This is not included in the fetch.
No
pagesizeIntegerpaging20-100The size of the list to be fetched.No
languageStringIndicate in which language you want to receive error messages.No
localtimezoneBooleanTrue/falseTrue = local timeNo

Output

OutputTypeValuesDescription
transactionid (transactionlist)IntegerThe unique number identifying the payment.
created (transactionlist)DatetimeDate of creation
name (inputlist)StringInput name
value (inputlist)StringInput value
pagesize (paging)IntegerThe size of the fetched list.
lastevaluatedkeyLongThe transactionid which was added to the list most recently.
resultBooleanSee description of output values.
messageStringIf result is false, message will show a detailed error description.
reasonEnum0 = OK
1 = Error
requestresponselogidLongThis is only included for test accounts or if an error occured (result is false).
Output valuesIf the call was successful, result is returned as true. If not, the returning value is false. When false is returned, please use message to detect the source of error.