DirectDebit API

This HTTP API can prepare your payments that need to be collected through a SEPA direct debit. For each payment you invoke the Start API with the amount that must be collected and from which bank account.

You will get for each debit request, a instant first status based on a number of checks, such as the bank account. The outstanding debt collection cases are offered daily at the bank. The specified report URL receives updates about the status of the payment. The agreement confirmation usually occurs after approximately 2 workingdays.


By default, automatic debit is not enabled for your account.
For more information and terms contact our sales team at sales@targetmedia.eu.
You can use iDEAL payments as authorization instead of a written authorization.
Use below this, the account number and customer name as the check API iDEAL returned.

Start API Request payment


Before starting the payment, you have to call the Start API. You will get a paymentlink and a transaction ID (for in your database).


Call the next URL with GET or POST:

https://transaction.digiwallet.nl/directdebit/start


With the following parameters (* = required):

Variable Explanation Example
ver* API version, this is version 2 2
rtlo* Shop ID (also known as subaccount or layoutcode) to which the payment has to be made 93393
amount* Amount in eurocents: Minimum 100 , Maximum 100000 1000
description* Description of the transaction: this will apear on the customer's bank statement. Use only letters or numbers, max. 32 characters Webshop order #1234
reporturl* Report URL: is called after payment (server-to-server), by means of a POST. Check here if the payment was indeed completed and process the order further. This script is also invoked if the customer were to accidentally close the browser. If parameters are sent:
  • trxid: order number
  • rtlo: shop ID (layoutcode)
  • status: Status of the payment:
    • Success   payment has been presented and accepted by the bank.
    • Chargeback   the payment has been reversed by the customer.
    • Rejected   the payment has been denied by the bank.
  • amountpaid: the amount paid in eurocents
  • checksum: md5 from trxidrtlostatussalt
    Example (salt is e381277):
    $checksum = md5($_POST["trxid"].$_POST["rtlo"].$_POST["status"]."e381277");
To ensure that the status is coming from DigiWallet, you have always to call the Check API. The output of the report URL is not visible for your customer. Your customer is redirected to the return URL.
https://www.myshop.nl /reportOrder
returnurl Return URL: the customer will recieve a payment confirmation after the payment if you pass us the customers email address. Inside the payment confirmation mail is a return URL. The transaction number is passed to the return URL as trxid.
Example: https://www.myshop.nl/thankYouPage?trxid=30626804185492
https://www.myshop.nl /thankYouPage
once Whether this is a one-off payment or not.
This shows the consumer inside their online banking environment that the upcoming debit is one-off and will not recur.
Note that a one-off payment always needs to have a unique mandate. This parameter is optional, the default is: 0
1 or 0
email Email address of the customer. When filled in, we will send a payment confirmation by email to your customer. test@example.com
salt* Salt: a random series of numbers of which the checksum is calculated, which is included in the report URL. Up to 32 characters. e381277
cbank* IBAN of the customer, for the debt collection NL20RABO02873663091
cname* Name of the customer. Maximum length is 35 characters. K Raaijmakers
mandate* Unique identification number for the direct debit. For examle the customer ID. 29991
mandatestart* The date of when the consumer entered the debt agreement(YYYY-MM-DD). Use the date 2009-11-01 for agreements that went in before 01 februari 2014 2024-03-28
duedate Date of when the debit shall take place (YYYY-MM-DD). You can specify a date in the future if you want to collect the payment in the future. Until that time, the transaction status shall remain 'Open'.
If the field is left open, the date will be held today. If the processing date falls in the weekend or on a national holiday the debit will be passed to the bank on the first weekday.
2024-04-11
securitylevel* Allows you to specify how strict the debits should be checked to avoid setting double payments ready. We recommend the level set as high as possible.

Example 1: If your debit is used once a month to bill for subscription money, select level 5 (very severe), as an account number can not come several times a day.

Example 2: You sell products where it is conceivable that multiple payments are open on the same day, then choose a lower level.

A payment may be accepted by DigiWallet if ...
  • 5: ... past week there has been a debit on this bankaccount number (= very strict)
  • 4: ... there is an open payment with this bankaccount number
  • 3: ... there is an open payment with the same amount for this bankaccount number
  • 2: ... there is an open payment with the same amount and description for this bankaccount number
  • 1: Payment is always accepted
5
userip IP address of the customer: not mandatory, but is useful in detecting any problems. 213.76.8.33
test Whether to use the DigiWallet Test Panel.
When enabled, the launch URL is a link to the Test Panel, where no real money will be charged.
Note that when you have your outlet set to test-mode through the DigiWallet Dashboard, this parameter will be forced to 1.

Remember to turn off this option when the site goes live. The default is, test mode off.
"1" or "0"

* Note: The preprodtest parameter is not available for DirectDebit.

You will then get result in the following form:

resultaatcode   OK | transactienummer

Example

000000 OK|651691489

If test-mode is enabled, you will receive the DigiWallet Test Panel URL at the end:

resultaatcode   OK | transactienummer | test-panel-URL

Example

000000 OK|651691489|https://pay.digiwallet.nl/test-transaction?transactionID=1057394782&paymethod=DRD&hash=341eabb42b1cca7c4045831fef0c7812e6cbdb0ca31d524b78163193bbd5b5ca
In this case, you will have to perform a redirect to the Test Panel.


Possible result codes:

Result code Description
000000 Payment is prepared
DW_XE_0003 Validation failed, details: JSON-encoded array One or more fields failed to validate, you can decode the JSON array for a detailed analysis.
DW_IE_0002 Maximum retries at acquirer bank exceeded for primary and fallback The acquirer system did not respond multiple times in a row, indicating there might be a service disruption going on.
DW_IE_0006 System is busy, please retry later Internal systems are overloaded and DigiWallet is likely already working on resolving the problem.
DW_IE_0001 Unknown internal error Unknown internal error, mail to techsupport@targetmedia.eu to be sorted out.

Check in case of errors if the parameters are correctly taken from the documentation. If this seems to be the case. Please contact DigiWallet and mention the error message.

Check API Request payment status


Based on the transaction number you can check if the payment is actually made. After payment, the report URL underwater is invoked by the DigiWallet server. It also mentions the payment status, but for safety reasons we strongly recommend to always ask the status from DigiWallet.

Invoke the following URL with a GET or POST:

https://transaction.digiwallet.nl/directdebit/check

The following parameters (* = required):

Variable Explanation Example
rtlo* Shop ID (layoutcode) 93393
trxid* Transaction number 30626804185492
test If you have started the transaction in test-mode, call the Check API in test-mode as well. Otherwise your transaction will not be found.

Note that when you have your outlet set to test-mode through the DigiWallet Dashboard, this parameter will be forced to 1.

Remember to turn off this option when the site goes live. The default is, test mode off.
1
once* If you fill in 1, then an OK status will be returned only once. If the URL mentioned above is invoked for the same transaction then a DW_SE_0028 Transaction already checked will follow. If you fill in '0' for once, a 000 000 OK status will always keep coming back. 0


You will receive as answer:

Result code Description
000001 Open The payment has not been offered at the bank yet
000002 Processing The payment has been offered to the bank, but has not been processed yet
000003 Chargeback The consumer has charged back the money
000004 Rejected The bank has declined the debit
DW_XE_0003 Validation failed, details: JSON-encoded array One or more fields failed to validate, you can decode the JSON array for a detailed analysis.
DW_IE_0002 Maximum retries at acquirer bank exceeded for primary and fallback The acquirer system did not respond multiple times in a row, indicating there might be a service disruption going on.
DW_IE_0006 System is busy, please retry later Internal systems are overloaded and DigiWallet is likely already working on resolving the problem.
DW_IE_0001 Unknown internal error Unknown internal error, mail to techsupport@targetmedia.eu to be sorted out.