The complete guide to integrating with Express Bank
A short walkthrough of the sales process will be presented, along with details on how the different parts of the process is best implemented.
With Express Bank Financing, the customer adds products to his cart as usually, and proceeds through the usual checkout flow. Express Bank is added as a payment option, alongside the existing options, for the customer to choose between. From the webshops point of view, the financing option is to be considered as equal to eg. a credit card payment method.
The payment method works by receiving a unique link from a web service, and redirecting the customer to that link. The process in described in the prefilling section. The web service also responds with a token that is used to reference the application later in the process.
The customer fills the application form and submits it. Once it is submitted, the feedback service can see it. The credit scoring takes 10-12 seconds, and the customer is then presented with either an approval
or a denial.
If the application is accepted: The customer will be presented with a link
to our signing partner, where he can sign the application digitally.
If the application is declined: The customer will have the option to click
a "Back to webshop"-button, and return to the store, to select another payment option.
In order to determine which orders are ready to be sent, a Feedback Poller should be implemented. The poller is responsible for updating the status of the orders, thus letting the webshop know which orders are ready to ship. It will also cancel pending orders after an appropriate amount of time.
Prefilling takes care of the process of sending the customer from the checkout page in the webshop, to the application page at Express Bank.
The function is build around a SOAP Web Service, that receives a number of parameters from the partner. There are both mandatory and optional parameters. Once these parameters are sent, a unique application identifier (GUID) is returned. This identifier is then used to redirect the customer to the application form.
https://preprod.ekspresbanktest.com/?flexid=GUID
https://ans.ekspresbank.com/?flexid=GUID
https://preprodservices.ekspresbanktest.com/prefilling/PrefillingService.wsdl?wsdl
https://services.ekspresbank.com/prefilling/PrefillingService.wsdl?wsdl
<?php
$soapparams = array("soap_version"=> SOAP_1_1, "trace"=>1, "exceptions"=>0, );
$prefillClient = new SoapClient('https://preprodservices.ekspresbanktest.com/prefilling/PrefillingService.wsdl?wsdl', $soapparams);
class dto {
public $Name;
public $Value;
}
class InitiateApplication {
public $PartnerId;
public $ProductId;
public $ProductGroupId;
public $Values;
function __construct() {
$Values = array();
}
}
$valuePairs = array();
function addValuePair($name, $value){
global $valuePairs;
$dto = new dto;
$dto->Name = $name;
$dto->Value = $value;
array_push($valuePairs,$dto);
}
addValuePair('CreditPayoutAmount','0000'); // Insert the value of the shopping basket here
addValuePair('PartnerMainKey',''); // Insert your own internal order reference here
addValuePair('GoodsPurchased',''); // Insert the product title here
addValuePair('GoodsTotalCost','0000'); // Insert the value of the shopping basket here (again). Legal requirement.
addValuePair('Option.AutoSubmit','0'); // Always send zero
$param = new InitiateApplication();
$param->Values = $valuePairs;
$param->PartnerId = 00000; // Insert your PartnerId here
$param->ProductGroupId = 0; // Insert your ProductGroupId here
$input = array('input'=>$param);
$retval = $prefillClient->InitiateApplication($input);
$appGuid = $retval->InitiateApplicationResult->ApplicationGuid; // SAVE THIS GUID FOR LATER USE
header("location:https://preprod.ekspresbanktest.com/?flexid=" . $appGuid);
?>
In order to know the status of an application, a SOAP Web Service is provided by Express Bank. Using a PartnerId and a unique application identifier (GUID), the status of an application can be requested.
Once the customer has been redirected to the application form, the partner should start polling the web service for the status of the application. This is the only way for the partner to know what the status of an application is. The optimal implementation is to poll the web service every 15 minutes, and request the status for each application that does not yet have status GoAhead or is cancelled.
Parameter Name | Example Values | Description |
---|---|---|
PartnerId | 1088 | The shops PartnerID |
FinancePasskey | 11d1111111-222d-3f33-4444-555555e5d555 | Unique ID provided by Express Bank |
ApplicationGuid | 00000000-0000-0000-0000-000000000000 | The unique ApplicationGuid identifying the application Must be set to "00000000-0000-0000-0000-000000000000"" if ApplicationId and/or PartnerMainKey is used as the application identifier. |
ApplicationId | 12345678 | The unique ApplicationId identifying the application Value must be set to 0 if ApplicationGuid and/or PartnerMainKey is used as the application identifier. |
PartnerMainkey | 1234abcd | Must always be unique if to be used as the application identifier. Can be omitted if ApplicationGuid and/or ApplicationId is used as the application identifier. |
RefundRequestAmount | 2000.75 | The amount to refund with two decimals. Use "." as decimal separator. |
RefundRequestId | 12ab34 | Must be unique for each request |
ReasonCode | DefectInProduct | Possible values:
|
RefundDate | 2017-10-03T08:00:00 | The date on which the refund is requested.ISO 8601. |
Here is a simplified XML code sample of the request.
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns="http://ekspresbank.dk/feedbackservice/2014/01">
<soapenv:Header/>
<soapenv:Body>
<ns:CreateRefundRequest>
<ns:input>
<ns:PartnerId>1234</ns:PartnerId>
<ns:FinancePasskey>0c00bad0-c000-00ac-a0a0-00f000d00ae</ns:FinancePasskey>
<ns:ApplicationGuid>adeb6133-b5b1-437b-ad1b-a7fa014e6d9e</ns:ApplicationGuid>
<ns:ApplicationId>0</ns:ApplicationId>
<ns:PartnerMainkey>0</ns:PartnerMainkey>
<ns:RefundRequestAmount>100.00</ns:RefundRequestAmount>
<ns:RefundRequestId>89747</ns:RefundRequestId>
<ns:ReasonCode>ProductRecalled</ns:ReasonCode>
<ns:RefundDate>2017-10-03T08:00:00</ns:RefundDate>
</ns:input>
</ns:CreateRefundRequest>
</soapenv:Body>
</soapenv:Envelope>
Parameter Name | Example Values | Description |
---|---|---|
RefundRequestResult | Accepted Declined Error |
When everything passes and the amount is within bounds. When the amount is out of bounds. When the values provided fails validation. |
RefundRequestMessage |
The refund request has been accepted and will now be processed. The requested refund is larger than the RemainingPayoutAmount. The PartnerId is not related to the provided EventRecordPasskey. |
Accepted Declined Error |
RefundRequestId | 12ab34 | RefundRequestId from the request. |
RemainingPayoutAmount | 249.00 |
On Accept this parameter contains the amount that remains after the refund. On Decline it contains the amount remaining before the refund. On Error it will be set to NULL, not zero or blank.* If zero is returned (on Accept or Decline) it means the financing is completely refunded. |
And a sample of the response:
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Body>
<CreateRefundRequestResponse xmlns="http://ekspresbank.dk/feedbackservice/2014/01">
<CreateRefundRequestResult xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<RequestId>2f9f110b-561f-46dc-ac59-559ff594cca7</RequestId>
<RefundRequestResult>Accepted</RefundRequestResult>
<RefundRequestMessage>The refund request has been accepted and will now be processed.</RefundRequestMessage>
<RefundRequestId>89747</RefundRequestId>
<RefundRequestAmount>100.00</RefundRequestAmount>
<RemainingPayoutAmount>5899.00</RemainingPayoutAmount>
</CreateRefundRequestResult>
</CreateRefundRequestResponse>
</s:Body>
</s:Envelope>
We provide an interface to query the remaining amount on a specific application through the GetRefundRequest function. The following parameters are required:
Parameter Name | Example Values | Description |
---|---|---|
PartnerId | 1088 | The shops PartnerID |
FinancePasskey | 11d1111111-222d-3f33-4444-555555e5d555 | Unique ID provided by Express Bank |
ApplicationGuid | 00000000-0000-0000-0000-000000000000 | The unique ApplicationGuid identifying the application Must be set to "00000000-0000-0000-0000-000000000000"" if ApplicationId and/or PartnerMainKey is used as the application identifier. |
ApplicationId | 12345678 | The unique ApplicationId identifying the application Value must be set to 0 if ApplicationGuid and/or PartnerMainKey is used as the application identifier. |
PartnerMainkey | 1234abcd | Must always be unique if to be used as the application identifier. Can be omitted if ApplicationGuid and/or ApplicationId is used as the application identifier. |
Below is a simplified XML sample code for GetRefundRequest.
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns="http://ekspresbank.dk/feedbackservice/2014/01">
<soapenv:Header/>
<soapenv:Body>
<ns:GetRefundRequest>
<ns:input>
<ns:PartnerId>1116</ns:PartnerId>
<ns:FinancePasskey>8c81bad3-c099-43ac-a0a8-84f5782d03ae</ns:FinancePasskey>
<ns:ApplicationGuid>00000000-0000-0000-0000-000000000000</ns:ApplicationGuid>
<ns:ApplicationId>16282533</ns:ApplicationId>
<ns:PartnerMainkey>0</ns:PartnerMainkey>
</ns:input>
</ns:GetRefundRequest>
</soapenv:Body>
</soapenv:Envelope>
Parameter Name | Example Values | Description |
---|---|---|
PartnerId | 1088 | The shops PartnerID |
FinancePasskey | 11d1111111-222d-3f33-4444-555555e5d555 | Unique ID provided by Express Bank |
ApplicationGuid | 00000000-0000-0000-0000-000000000000 | The unique ApplicationGuid identifying the application Must be set to "00000000-0000-0000-0000-000000000000"" if ApplicationId and/or PartnerMainKey is used as the application identifier. |
ApplicationId | 12345678 | The unique ApplicationId identifying the application Value must be set to 0 if ApplicationGuid and/or PartnerMainKey is used as the application identifier. |
PartnerMainkey | 1234abcd | Must always be unique if to be used as the application identifier. Can be omitted if ApplicationGuid and/or ApplicationId is used as the application identifier. |
Below is a simplified XML sample code from the response.
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Body>
<GetRefundRequestResponse xmlns="http://ekspresbank.dk/feedbackservice/2014/01">
<GetRefundRequestResult xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<QuerySuccess>true</QuerySuccess>
<ApplicationGuid>21418c90-7205-492d-93de-a80200dd8e7b</ApplicationGuid>
<ApplicationId>16282533</ApplicationId>
<PartnerMainkey i:nil="true" />
<RemainingPayoutAmount>0.00</RemainingPayoutAmount>
<RefundRequests>
<GetRefundRequestOutput.RefundRequest>
<RefundRequestId>5637945579</RefundRequestId>
<RefundRequestDateTime>2017-10-04T15:35:54.603</RefundRequestDateTime>
<RefundRequestInitiator>Partner</RefundRequestInitiator>
<RefundRequestAmount>3593.00</RefundRequestAmount>
<RefundDate>2017-10-04T00:00:00</RefundDate>
<ReasonCode>DefectInPproduct</ReasonCode>
<RemainingPayoutAmount>699.00</RemainingPayoutAmount>
</GetRefundRequestOutput.RefundRequest>
<GetRefundRequestOutput.RefundRequest>
<RefundRequestId>5637945597</RefundRequestId>
<RefundRequestDateTime>2017-10-05T09:15:40.103</RefundRequestDateTime>
<RefundRequestInitiator>Partner</RefundRequestInitiator>
<RefundRequestAmount>699.00</RefundRequestAmount>
<RefundDate>2017-10-05T00:00:00</RefundDate>
<ReasonCode>DefectInPproduct</ReasonCode>
<RemainingPayoutAmount>0.00</RemainingPayoutAmount>
</GetRefundRequestOutput.RefundRequest>
</RefundRequests>
<Message i:nil="true" />
<RequestId>ca0e2f57-667c-494f-b7d8-ece6cd4a4e94</RequestId>
</GetRefundRequestResult>
</GetRefundRequestResponse>
</s:Body>
</s:Envelope>
https://preprodservices.ekspresbanktest.com/feedback/FeedbackService.wsdl?wsdl
https://services.ekspresbank.com/feedback/FeedbackService.wsdl?wsdl
<?php
$soapparams = array("soap_version"=> SOAP_1_1, "trace"=>1, "exceptions"=>0,);
$feedbackClient = new SoapClient('https://preprodservices.ekspresbanktest.com/feedback/FeedbackService.wsdl?wsdl', $soapparams);
class GetApplicationStatusInput {
public $PartnerId;
public $ApplicationGuid;
public $ApplicationId;
}
$app = new GetApplicationStatusInput();
// STATIC EXAMPLE OF APPLICATION
$PartnerId = "00000"; // Insert your PartnerId here
$ApplicationGuid = "00000000000-0000000-000000-000000000"; // Insert the ApplicationGuid here
//LOAD ALL APPLICATIONS FROM THE APPLICATIONLIST INTO AN ARRAY HERE
$applicationList = array(
array("PartnerId" -> $PartnerId, "ApplicationId" -> $ApplicationGuid)
)
foreach($curApp in $applicationList){
$app->PartnerId = $curApp->$PartnerId;
$app->ApplicationGuid = $curApp->$ApplicationGuid;
$input=array('input'=>$app);
$retval = $feedbackClient->GetApplicationStatus($input);
//Reading feedback response to local variables
$IsOk = $retval->GetApplicationStatusResult->IsOk;
$CurrentStatus = $retval->GetApplicationStatusResult->CurrentStatus;
$LatestEvent = $retval->GetApplicationStatusResult->LatestEvent;
$HasGoAhead = $retval->GetApplicationStatusResult->HasGoAhead;
$HasShipped = $retval->GetApplicationStatusResult->HasShipped;
$ContractUrl = $retval->GetApplicationStatusResult->ContractUrl;
//Cancel order if application is declined or cancelled, and remove from polling list
if($CurrentStatus == 3 || $CurrentStatus == 4){
//---CANCEL ORDER IN ERP-SYSTEM---
//---REMOVE GUID FROM POLLING LIST---
}
//Mark the order ready for shipment and remove from polling list
if($CurrentStatus == 2 && $HasGoAhead){
//---ORDER IS SIGNED AND READY TO SHIP. UPDATE STATUS IN ERP-SYSTEM---
//---REMOVE GUID FROM POLLING LIST---
}
}
?>
<?php
$soapparams = array("soap_version"=> SOAP_1_1, "trace"=>1, "exceptions"=>0,);
$feedbackClient = new SoapClient('https://preprodservices.ekspresbanktest.com/feedback/FeedbackService.wsdl?wsdl', $soapparams);
class GetApplicationStatusInput {
public $PartnerId;
public $ApplicationGuid;
public $ApplicationId;
}
$app = new GetApplicationStatusInput();
$PartnerId = "00000"; // Insert your PartnerId here
$ApplicationGuid = "00000000000-0000000-000000-000000000"; // Insert the ApplicationGuid here
$app->PartnerId = $PartnerId;
$app->ApplicationGuid = $ApplicationGuid;
$input=array('input'=>$app);
$retval = $feedbackClient->GetApplicationStatus($input);
//Reading feedback response to local variables
$IsOk = $retval->GetApplicationStatusResult->IsOk;
$CurrentStatus = $retval->GetApplicationStatusResult->CurrentStatus;
$LatestEvent = $retval->GetApplicationStatusResult->LatestEvent;
$HasGoAhead = $retval->GetApplicationStatusResult->HasGoAhead;
$HasShipped = $retval->GetApplicationStatusResult->HasShipped;
$ContractUrl = $retval->GetApplicationStatusResult->ContractUrl;
//Declined or cancelled application
if($CurrentStatus == 3 || $CurrentStatus == 4){
//---INSERT CODE HERE---
}
//Approved application
if($CurrentStatus == 2){
//---INSERT CODE HERE---
}
?>
<?php
$soapparams = array("soap_version"=> SOAP_1_1,"trace"=>1,"exceptions"=>0,);
$client = new SoapClient('https://preprodservices.ekspresbanktest.com/feedback/FeedbackService.wsdl?wsdl', $soapparams);
class PutEventRecordInput
{
public $PartnerId;
public $ApplicationGuid;
public $EventRecordPasskey;
public $EventType;
public $EventDT;
}
$app = new PutEventRecordInput();
$app->PartnerId="00000"; // Insert your PartnerId here
$app->ApplicationGuid='00000000000-0000000-000000-000000000'; // Insert the GUID of the application you want to ship
$app->EventRecordPasskey="00000000-0000-0000-0000-000000000000"; // Insert your EventRecordPasskey here
$app->EventType="282"; // Ship-event. Static value.
$app->EventDT="0000-00-00T00:00:00"; //Insert time of physical shipment of the goods (YYYY-MM-DDTHH:MM:SS)
$input=array('input'=>$app);
$retval = $client->PutEventRecord($input);
if($retval->PutEventRecordResult->IsOk) //Success. Else, something went wrong;
?>
<?php
$soapparams = array("soap_version"=> SOAP_1_1,"trace"=>1,"exceptions"=>0,);
$client = new SoapClient('https://preprodservices.ekspresbanktest.com/feedback/FeedbackService.wsdl?wsdl', $soapparams);
class PutEventRecordInput
{
public $PartnerId;
public $ApplicationGuid;
public $EventRecordPasskey;
public $EventType;
public $EventDT;
}
$app = new PutEventRecordInput();
$app->PartnerId="00000"; // Insert your PartnerId here
$app->ApplicationGuid="00000000000-0000000-000000-000000000"; // Insert the GUID of the application you want to ship
$app->EventRecordPasskey="00000000-0000-0000-0000-000000000000"; // Insert your EventRecordPasskey here
$app->EventType="401"; // Cancel-event. Static value.
$app->EventDT="0000-00-00T00:00:00"; //Insert time of the cancellation (YYYY-MM-DDTHH:MM:SS)
$input=array('input'=>$app);
$retval = $client->PutEventRecord($input);
if($retval->PutEventRecordResult->IsOk) //Success. Else, something went wrong;
?>
Overview
Gain an overview of a standard eCommerce sales process, and how the Express Bank integration interacts with
this process.
Prefilling
Learn how to initiate an application through the Prefilling Web Service.
Feedback
Learn how to get feedback on applications, and how to proceed according to the different feedback responses.
Need additional help?
Contact us right now:
Matthieu Taillé
eCommerce Specialist
+45 28 94 28 10