PHP Classes

How to Use a PHP CAMT Parser Class to Extract Financial Transaction Detalis from a CAMT XML File Using the Package Booosta Std CAMT: Parse CAMT XML file to extract transaction data

Recommend this page to a friend!
  Info   Documentation   View files Files   Install with Composer Install with Composer   Download Download   Reputation   Support forum   Blog    
Last Updated Ratings Unique User Downloads Download Rankings
2026-06-28 (1 hour ago) RSS 2.0 feedNot yet rated by the usersTotal: Not yet counted Not yet ranked
Version License PHP version Categories
booosta-std_camt 1.0GNU Lesser Genera...5XML, PHP 5, Finances, Parsers
Description 

Author

This package can parse CAMT XML file to extract transaction data.

It provides a class that can take as parameter the path o a XML file in the CAMT format.

The class can return an array with the list of financial transactions detailed in the CAMT XML file.

Picture of Peter Buzanits
Name: Peter Buzanits <contact>
Classes: 4 packages by
Country: Austria Austria
Age: 56
All time rank: Not yet ranked
Week rank: Not yet ranked
Innovation award
Innovation award
Nominee: 3x

Instructions

Please read this document to learn how to extract the financial transactions from a CAMT XML file.

Documentation

CAMT XML reader for the Booosta Framework

This modules provides a reader for the CAMT inter banking format. Thanks to genko whos work this is based on (https://github.com/genkgo/camt).

Booosta allows to develop PHP web applications quick. It is mainly designed for small web applications. It does not provide a strict MVC distinction. Although the MVC concepts influence the framework. Templates, data objects can be seen as the Vs and Ms of MVC.

Up to version 3 Booosta was available at Sourceforge: https://sourceforge.net/projects/booosta/ From version 4 on it resides on Github and is available from Packagist under booosta/booosta .

Installation

This module can be used inside the Booosta framework. If you want to do so, install the framework first. See the installation instructions for accomplishing this. If your Booosta is installed, you can install this module.

You also can use this module in your standalone PHP scripts. In both cases you install it with:

composer require booosta/booosta-std_camt

Usage in the Booosta framework

In your scripts you use the module:

# [...]
$camt = $this->makeInstance('std_camt', $xml_file);
$transactions = $camt->getTransactions();

foreach($transactions as $transaction) {
  print PHP_EOL . 'record_id: ' . $transaction['record_id'];
  print PHP_EOL . 'transaction_id: ' . $transaction['transaction_id'];
  print PHP_EOL . 'date: ' . $transaction['date'];
  print PHP_EOL . 'datetime: ' . $transaction['datetime'];
  print PHP_EOL . 'timezone: ' . $transaction['timezone'];
  print PHP_EOL . 'amount: ' . $transaction['amount'];
  print PHP_EOL . 'amount_cent: ' . $transaction['amount_cent'];
  print PHP_EOL . 'currency: ' . $transaction['currency'];
  print PHP_EOL . 'message: ' . $transaction['message'];
  print PHP_EOL . 'is_credit: ' . $transaction['is_credit'];  // is it a credit (true) or debit (false) booking?
  print PHP_EOL . 'creditor_name: ' . $transaction['creditor_name'];
  print PHP_EOL . 'creditor_address: ' . $transaction['creditor_address'];
  print PHP_EOL . 'creditor_country: ' . $transaction['creditor_country'];
  print PHP_EOL . 'creditor_iban: ' . $transaction['creditor_iban'];
  print PHP_EOL . 'debtor_name: ' . $transaction['debtor_name'];
  print PHP_EOL . 'debtor_address: ' . $transaction['debtor_address'];
  print PHP_EOL . 'debtor_country: ' . $transaction['debtor_country'];
  print PHP_EOL . 'debtor_iban: ' . $transaction['debtor_iban'];
  print PHP_EOL;
}

Usage as Standalone Module

Just replace the first line of the above example with:

$camt = new \booosta\std_camt\Std_camt($xml_file);

Use of Stuzza format

Some CAMT files use a special format called "Stuzza". To tell the object to use this format just add this line right after the instantiation:

$camt->setMessageFormat('Stuzza');

  Files folder image Files (5)  
File Role Description
Files folder imagesrc (2 files)
Accessible without login Plain text file composer.json Data Auxiliary data
Accessible without login Plain text file LICENSE Lic. License text
Accessible without login Plain text file README.md Doc. Documentation

  Files folder image Files (5)  /  src  
File Role Description
  Plain text file Std_camt.php Class Class source
  Plain text file StuzzaMessageFormat.php Class Class source

The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page.
Install with Composer Install with Composer
 Version Control Unique User Downloads  
 100%
Total:0
This week:0