Download the PHP package ahr-ahr/qris-dynamic without Composer

On this page you can find all versions of the php package ahr-ahr/qris-dynamic. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package qris-dynamic

English | Bahasa Indonesia

QRIS Dynamic

PHP library for parsing, validating, decoding, and generating dynamic QRIS payloads.

PHP Tests License


Why This Library Exists

Most QRIS-related repositories only do one thing:

This library was built differently.

qris-dynamic understands the actual QRIS payload structure using a recursive TLV parser, CRC16 validation, payload abstraction, and dynamic QRIS generation.


What is QRIS Internally?

QRIS payload is basically:

Example:

Can be read as:

Part Meaning
54 Transaction Amount
05 Length
10000 Value

So mathematically:

Where:


QRIS Anatomy

Example QRIS payload:


Visual Breakdown


Important QRIS Tags

Tag Meaning Example
00 Payload Format Indicator 01
01 QR Type 11 = Static
26 Merchant Account Info Payment Provider
52 Merchant Category Code 4812
53 Currency 360 = IDR
54 Transaction Amount 10000
58 Country Code ID
59 Merchant Name SAMPLE MERCHANT
60 Merchant City MERCHANT CITY
63 CRC16 Checksum ABCD

Static vs Dynamic QRIS

Static QRIS

Static QRIS usually does not include tag 54 (transaction amount).

The customer enters the amount manually during payment.


Dynamic QRIS

Dynamic QRIS contains transaction amount.

Example:

Can be interpreted as:

Part Meaning
54 Amount Tag
05 Length
10000 Amount

This library injects the amount automatically and recalculates CRC16 safely.


CRC16 Visualization

CRC is the integrity protection layer of QRIS.

If payload changes:

then CRC becomes invalid.


Simplified CRC Flow


Nested Merchant Information

Some QRIS tags contain nested TLV values.

Example:

This library recursively parses nested structures automatically.


TLV Structure Visualization


How Parsing Works

QRIS parsing is essentially a sequential string slicing process.

The parser reads:

repeatedly until the payload ends.


Example

Payload:

Parser reads it like this:


Mathematical Interpretation

If:

then:

and:

Example:

means:

which is valid.


Sequential Parsing Algorithm

The parser works using offsets.

Pseudo flow:


Offset Visualization


Parser Complexity

The TLV parser operates in linear time complexity.

because the payload is scanned sequentially using offsets.


Nested TLV Parsing

Some QRIS tags contain another TLV structure internally.

Example:

This means the parser must recursively parse child payloads.


Recursive Parsing Visualization


Internal Parsing Flow


Why Recursive Parsing Matters

Many QRIS implementations fail because merchant account information itself contains nested TLV payloads.

Naive parsers usually:

This library recursively parses nested structures safely before rebuilding the payload and recalculating CRC16.


Features


Installation


Basic Usage


Generate Dynamic QRIS


Decode QRIS Image


Parse TLV Payload


Example Output


Validation Logic

QRIS validation in this library consists of two layers:

  1. Structural validation
  2. CRC16 checksum validation

Structural Validation

The parser verifies:

Example:

is valid because:


CRC16 Validation

CRC16 ensures payload integrity.

If even one character changes:

then checksum becomes invalid.


Validation Pipeline


Validate QRIS

Quick Validation


Validation With Exceptions


Fluent API


Exception Hierarchy


Example Parsed QRIS


Project Structure


Testing

Run all tests:


Current Test Status


Roadmap


License

This project is licensed under the MIT License.


Disclaimer

This library is an independent open-source project and is not affiliated with Bank Indonesia or any payment provider.

Use responsibly and always validate generated QRIS payloads before production use.


All versions of qris-dynamic with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
endroid/qr-code Version ^6.0
khanamiryan/qrcode-detector-decoder Version ^2.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package ahr-ahr/qris-dynamic contains the following files

Loading the files please wait ...