Credit Card 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) ;

By default, Credit Card is not enabled for your account.
For more information and terms contact our sales team at sales@targetmedia.eu.

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/creditcard/start

With the following parameters (* = required):

Variable Explanation Example
ver* API version, this is version 3 3
rtlo* Outlet ID (also known as subaccount or layoutcode) to which the payment is to be made 93393
amount* Amount in eurocents: Minimum 1 , Maximum 1000000 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: Outlet ID (layoutcode)
  • status: status-code of the payment, see Check API
  • mandateid: ID of the mandate, in case of recurring payments
  • country: 3-character country code of the consumer
  • maskedcardnumber: Masked CreditCard number of the consumer
  • cardexpirydate: YYYYMM expiry date of the card
  • cardbrand: Brand of the card, e.g. MASTERCARD, VISA, etc...
  • externalreason: Success indication or, in case of failure, reason for failure
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
userip* IP address of the customer. 213.76.8.33
language 2-letter ISO language code to present the acquirer card-number screen in.
If not provided or supported, a GeoIP lookup is performed on the userip parameter.
If not supported or not found, this defaults to EN for English.

For available values, please refer to the (Available Languages).
NL
currency 3-letter ISO currency code to charge the customer in.
If not provided, this defaults to EUR for Euro's.

Note that if anything other than EUR is provided, a specific pricing agreement for that currency must exist on the Outlet. Please contact the Sales department for more information.
EUR
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"
preprodtest Whether to use the acquirer test connection or not, instead of the DigiWallet Test Panel.
When using the test connection, no real money will be charged. Setting this to 1 also forces the "test" parameter to 1 automatically. You can use the following test card information:
  • Card number: 4100 0000 0000 0000
  • Expiry date in the future
  • CVV: 123
"1" or "0"


You will then get result in the following:

resultaatcode   transactienummer|launchURL

Example

000000 103084|https://pay.digiwallet.nl/consumer/creditcard/launch/103084/da85a5e0-b29e-11e8-9332-ecf4cbbfde30/0
You can then save transactienummer in your database and send the visitor to the launchURL 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.

Available Languages


The values below are supported languages for the acquirer's card-number input screen.

Result code Description
BG Bulgarian
BR Breton
CS Czech
DA Danish
DE German
EL Greek
EN English
ES Spanish
ET Estonian
FI Finnish
FR French
HI Hindi
HR Croatian
HU Hungarian
IT Italian
JA Japanese
KO Korean
LT Lithuanian
LV Latvian
NL Dutch
NO Norwegian
PL Polish
PT Portuguese
RO Romanian
RU Russian
SK Slovak
SL Slovene
SV Swedish
TR Turkish
UK Ukrainian
ZH Chinese

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/creditcard/check

The following parameters (* = required):

Variable Explanation Example
rtlo* Outlet 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 %s datetime Already redeemed