Client for using the Mass data transmission DIP (mass data interface).
The BZSt (Bundeszentralamt für Steuern / Federal Central Tax Office) provides the Digital Inbox (DIP) as a service for payment service providers to transmit financial data.
Clients need to register / login at BZSt online.portal through Elster, BundID or BZSt Online-Portal (BOP).
See the BZSt Information for more information.
Note
BZSt Online-Portal (deprecated) is different from BZSt online.portal.
We created this client to make it as easy as possible for the developer to use the BZSt DIP. Through usage of the builder pattern (see Configuration below), DTOs and a typesafe data model we ensure high usability and readability.
The BZSt provides XSD that define the expected XML structure and make it possible to generate java classes (BZSt Docs).
Our library validates each request through these XSD find errors before they are sent to the DIP.
Installation guide for the latest release
See the examples in the demo package.
For authentification at the BZST you have to create a public- and private-key.
First you have to create a PEM file as described on the BZST Website (see 1.7).
OpenSSL can be downloaded from their website.
openssl req -newkey rsa-pss -new -nodes -x509 -days 3650 -pkeyopt rsa_keygen_bits:4096 -sigopt rsa_pss_saltlen:32 -keyout key.pem -out cert.pem
Next you have to convert that file to a PKCS12 file.
openssl pkcs12 -export -in cert.pem -inkey key.pem -out certificate.p12 -name "certificate"
The keytool is contained in your JDK installation.
keytool -importkeystore -srckeystore certificate.p12 -srcstoretype pkcs12 -destkeystore cert.jks
The password you insert here, along with the file itself must be set in the client configuration. See example at app.properties:
certificate.keystore.password=SECRET_PASSWORD
certificate.keystore.file=cert.jks
You also have to set the public key in the BZST online.portal. Exporting the public key with OpenSSL is easy:
openssl rsa -in key.pem -pubout > publicKey.pub
It's also important to use the client id provided by BZST online.portal in the client configuration. See example at app.properties:
client.id=abcd1234-ab12-ab12-ab12-abcdef123456
The client can be configured through a properties file (see app.properties and ApplicationWithConfigurationFromProperties.java) or by creating a configuration object (see Application.java).
public static BzstDipConfiguration createConfiguration()
{
return new BzstDipConfigurationBuilder()
.setClientId("abcd1234-ab12-ab12-ab12-abcdef123456")
.setTaxID("86095742719")
.setTaxNumber("123")
.setCertificateKeystoreInputStream(() -> ClassLoader.getSystemClassLoader()
.getResourceAsStream("DemoKeystore.jks"))
.setCertificateKeystorePassword("test123")
.setRealmEnvironmentBaseUrl(BzstDipConfiguration.ENDPOINT_URL_TEST)
.setMessageTypeIndic(BzstDipDpiMessageType.DPI_401)
.setReportingPeriod(LocalDate.now())
.setDocTypeIndic(BzstDipOecdDocType.OECD_1)
.setPlatformOperatorOrganizationName("TestOrg")
.setPlatformOperatorPlatformName("TestApp")
.setPlatformOperatorAddress(new BzstDipAddressFix("TestCity"))
.buildAndValidate();
}
If you need support as soon as possible, and you can't wait for any pull request, feel free to use our support.
See the contributing guide for detailed instructions on how to get started with our project.
View the license of the current project or the summary including all dependencies