Statement Subscription

This guide explains how to subscribe to CAMT.053 end-of-day statements.

  • Statements are generated daily after 01:30 CET.
  • Statement files are delivered to your pushUri.
  • Files are encrypted using the RSA public key provided during subscription POST* request under the encryption object..
📘

You can generate RSA key pair using the openssl genrsa command or any other preferred method.

Step 1 - Create Statement subscription

Endpoints:

Creation of a subscription
POST /account-notification-service/subscriptions?type=statement

Purpose: Create a new subscription for Statement notifications. Once the subscription is successfully created, a CAMT.053 end-of-day statement will be delivered to your pushUri

Step 2 - Receive Statement Notification

Once you have subscribed to statement notifications:

Every day at 01:30 AM CET time, you will receive a notification at the pushUri specified when creating the subscription.

The CAMT.053 file is included in the notification. Because the file is encrypted, your pushUri endpoint must support the following request format.

POST /your-uri Content-Type: multipart/form-data

PartNameTypeRequiredDescription
statementFile/MultipartFileYesThe encrypted statement file
metadataJson ObjectYesMetadata for the file. It contains the information required to decrypt the file content

Example CAMT.053 Notification

The metadata has the following structure:

{
  "notificationId": "UUID",
  "subscriptionId": "1e11cd6b-44aa-4715-862e-a0a3a92ac4ac",
  "timestamp": 1781861490647,
  "subscriptionEncryptionKeyId": "key-1",
  "base64EncryptedKey": "asiFAMcAkCeEnLUX7i8E2DrKTrnsdvSVbrOPjonbGgnmJ+zE19G1NIyf2szsA5nMbs4+jWNx+OsLAu/vbUbe5CcBLZaRgXWJ7hhu1+x+O2tzSXX2Jm9+u+O0tGS5vGLEXqSgYnRNw+Fz12ZSnHbCBG8e8Ofve4CTWbYDqA6is3A=",
  "keyEncryptionAlgorithm": "RSA algorithm",
  "payloadEncryptionAlgorithm": "AES algorithm",
  "base64PayloadNonce": "base64 encoded nonce"
}

The file contains the encrypted CAMT.053 XML content as a byte stream. It can be processed as a stream to avoid memory issues when handling large files.

👍

Acknowledge notifications as soon as possible or just immediately after a complete file is received . Delays slows down the processing of subsequent notifications, causing longer wait times and unnecessary retries.

File Decryption Logic

  1. You receive:
    1. An encrypted key.
    2. An encrypted file (File is encrypted with symmetric AES key.).
    3. A Base64 encoded IV (nonce).
    4. The encryption algorithms used for both the file and the AES key.
  2. The AES key is included in the metadata and encrypted using the RSA public key provided when the subscription was created.
  3. Decrypt the AES key using the corresponding RSA private key and the algorithm information provided in the metadata.
  4. Use the decrypted AES key to decrypt the file.
  5. The result is the decrypted CAMT.053 XML content.

Reference pseudo code available here.

📘

You can process the file entirely in memory or in chunks, depending on the file size and your application's requirements.

Retry mechanism

Ensure that your pushUriendpoint remains available to receive notifications.

If delivery fails, the system retries:

  • First retry: after 2 minutes
  • Second retry: after 13 minutes
  • Third and final retry: after 29 minutes