Integrating Billpay

Edit on GitHub

Billpay offers multiple payment methods (Invoice, Direct Debit, PayLater, Instalment). Availability of payment methods differs from country to country. Please contact Billpay directly or visit the Billpay websitee for details.

The Billpay module provides integration with the Invoice with prescoring payment method.


Billpay comes with a config.dist.php file that you can use as a sample configuration for your project by copying its content to your project configuration file. You can find all of your project configuration files in the configfolder.

See Configuration Management for details on the configuration.

Configuration Options:

GATEWAY_URL url to Billpay API
BILLPAY_MERCHANT_ID Merchant ID that Billpay will provide to you
BILLPAY_PORTAL_ID Portal ID that Billpay will provide to you
BILLPAY_SECURITY_KEY MD5 hash of the security key generated for this portal. (generated and delivered by BillPay)
BILLPAY_PUBLIC_API_KEY Public API Key; generated and delivered by BillPay for your portal.
BILLPAY_MAX_DELAY_IN_DAYS Amount of days that will be added to the payment due date (e.g. in case of delayed shipping)
USE_MD5_HASH If your security key is not md5 hash encrypted, you can do that by setting this config to 1
USE_PRESCORE In if it is necessary to show all Billpay payment methods despite of Billpay prescore response, you can set this option to 0. It should be set to 1 by default.

When you add options above to your project configuration, it should look somewhat like this:

$config[BillpayConstants::GATEWAY_URL] = '';
$config[BillpayConstants::BILLPAY_MERCHANT_ID] = '6063';
$config[BillpayConstants::BILLPAY_PORTAL_ID] = '8635';
$config[BillpayConstants::BILLPAY_SECURITY_KEY] = 'IzjZ8hUwPQt6';
$config[BillpayConstants::BILLPAY_PUBLIC_API_KEY] = 'a39eb681636dec360000008635';
$config[BillpayConstants::BILLPAY_MAX_DELAY_IN_DAYS] = 20;
$config[BillpayConstants::USE_MD5_HASH] = 1;
$config[BillpayConstants::USE_PRESCORE] = 1;

Additional Configuration Options

Payone module provides dependency injectors to extend checkout and order processing. Please add or extend with the corresponding keys:

$config[KernelConstants::DEPENDENCY_INJECTOR_YVES] = [
 'Checkout' => [

$config[KernelConstants::DEPENDENCY_INJECTOR_ZED] = [
 'Payment' => [
 'Oms' => [

In order to use the Billpay module state machines, add the location path to configuration:

$config[OmsConstants::PROCESS_LOCATION] = [
 $config[KernelConstants::SPRYKER_ROOT] . '/Billpay/config/Zed/Oms',

$config[OmsConstants::ACTIVE_PROCESSES] = [

We link the OMS state machine with payment method as shown bellow:

 BillpayConstants::PAYMENT_METHOD_INVOICE => 'BillpayInvoice01',