Bancontact API

With the HTTP API for Request payment, you can start and check payments. Use the HTTP API when you want to send requests to DigiWallet from your shop or app and when the DigiWallet PHP SDK can not be used.

Payment in 2 steps:

  1. Start the payment via DigiWallet by calling an URL with all the details of the payment. DigiWallet gives you the link for the payment and a transaction ID. (Start API) ;
  2. The status of the payment will be reported and the visitor will be returned to your site. You can check the status of the payment with the "Check API" (Check API) ;

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/mrcash/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 49 , Maximum 500000 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
  • amount: amount in eurocents
  • rtlo: shop ID (layoutcode)
  • status: status-code of the payment, see Check API
To secure that the status return is coming from DigiWallet you should always call to Check API . The output of the report URL will not be visible to the customer. The customer is redirected to the return- or cancel URL.
https://www.myshop.nl /reportOrder
returnurl* Return URL: this page is where your customer will be referred to after a (successful) payment. To this URL shall the transaction number in the variable trxid be given.
Example: https://www.myshop.nl/thankYouPage?trxid=30626804185492
https://www.myshop.nl /thankYouPage
cancelurl Cancel URL: The URL where the visitor is sent to after cancelling the payment. If this is not completed, then after a cancelled payment there will be referenced to the return URL. https://www.myshop.nl /orderCancelled
lang Language according to ISO 639-1
Valid values are: NL, FR, EN. The field is not mandatory. The default value is NL
NL
userip* IP address of the customer. 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 Bancontact at this time.

You will then get result in the following:

resultaatcode   transactienummer | bank-url

Example

000000 15641569|https://transaction.digiwallet.nl/mrcash/launch?trxid=15641569
You can then save transactienummer in your database and send the visitor to the bank-url through a redirect.


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/mrcash/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


If the payment is successfully completed, you will receive as answer :

000000 OK


If the payment is not successfully completed or the transaction is unknown :

Error code Description
DW_SE_0020 Transaction has not been completed, try again later Transaction has not yet been completed, try again later
DW_SE_0021 Transaction has been cancelled Transaction has been cancelled
DW_SE_0022 Transaction has expired Transaction has expired (max. 10 minutes)
DW_SE_0023 Transaction could not be processed The transaction could not be processed
DW_SE_0028 Transaction already checked at datetime Already redeemed
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.

If you are using an older API version, some transaction status results are returned in a legacy format:

Error code Description
TP0010 Transaction not finished, try again later Transaction has not yet been completed, try again later
TP0013 Transaction was cancelled Transaction has been cancelled
TP0012 Transaction not finished and expired Transaction has expired (max. 10 minutes)
TP0011 Transaction failed The transaction could not be processed
TP0014 Already redeemed at datetime Already redeemed