PHPackages                             gandhist/ematerai - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. gandhist/ematerai

ActiveLibrary[API Development](/categories/api)

gandhist/ematerai
=================

Mekari eMaterai API Client for Laravel

31PHP

Since Aug 24Pushed 2y ago1 watchersCompare

[ Source](https://github.com/gandhist/laramaterai)[ Packagist](https://packagist.org/packages/gandhist/ematerai)[ RSS](/packages/gandhist-ematerai/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

### Unofficial Laravel library for eMaterai by Mekari

[](#unofficial-laravel-library-for-ematerai-by-mekari)

This is the unofficial library for eMaterai API by Mekari, for official documentation please visit [Mekari](https://mekari.com/)

1. Installation
---------------

[](#1-installation)

Install using [Composer](http://composer.org/) CLI : `composer require gandhist/ematerai`

2. How to use
-------------

[](#2-how-to-use)

### 2.1 General Setting

[](#21-general-setting)

Add to your env variables :

```
    MATERAI_CLIENT_ID=
    MATERAI_SECRET=
    MATERAI_CODE=
    MATERAI_IS_PRODUCTION=false
```

Add `use Gandhist\Ematerai\Config;`, set configuration :

```
    Config::$isProduction =  false;
    Config::$clientId =  env('MATERAI_CLIENT_ID');
    Config::$clientSecret =  env('MATERAI_SECRET');
    Config::$authCode =  env('MATERAI_CODE');
```

### 2. 2 Stamp a document

[](#2-2-stamp-a-document)

For stamping a document, you have to convert your PDF to base64, you can use [Base64 Guru](https://base64.guru/converter/encode/pdf) to convert your document. Add `use Gandhist\Ematerai\Stamping;`

```
    $stamp = new Stamping;
    $base64 = "your_base_64_pdf_file";
    $filename = "your_file_name.pdf";
    $callback = "https://webhook.site/e91fe71f-6672-4ae6-86b2-9018ba4df5a3?validation_key=ABCDE";
    $annotation = [[
        "page"  =>  4, // page you want to stamp
        "position_x"  =>  150, // set x axis
        "position_y"  =>  450, // set y axis
        "element_width"  =>  80,
        "element_height"  =>  80,
        "canvas_width"  =>  836,
        "canvas_height"  =>  1181,
        "type_of"  =>  "meterai"
    ]];
    $stamping = $stamp->stamp($base64, $filename, $annotation, $callback);
```

### 2.3 Get detail document by document id

[](#23-get-detail-document-by-document-id)

Add `use Gandhist\Ematerai\Document;`

```
$doc = new Document;
return $doc->detail("");
```

### 2.4 Resend/Restamp document by document id

[](#24-resendrestamp-document-by-document-id)

Add `use Gandhist\Ematerai\Stamping;`

```
$doc = new Stamping;
return $doc->restamp("");
```

###  Health Score

14

—

LowBetter than 2% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity21

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/7bca419861caaef71fbb38705eb0386643b5154ed7961f75f5b1dd63034a60ec?d=identicon)[gandhist](/maintainers/gandhist)

---

Top Contributors

[![gandhist](https://avatars.githubusercontent.com/u/22018903?v=4)](https://github.com/gandhist "gandhist (8 commits)")

### Embed Badge

![Health badge](/badges/gandhist-ematerai/health.svg)

```
[![Health](https://phpackages.com/badges/gandhist-ematerai/health.svg)](https://phpackages.com/packages/gandhist-ematerai)
```

###  Alternatives

[stripe/stripe-php

Stripe PHP Library

4.0k143.3M475](/packages/stripe-stripe-php)[twilio/sdk

A PHP wrapper for Twilio's API

1.6k92.9M270](/packages/twilio-sdk)[knplabs/github-api

GitHub API v3 client

2.2k15.8M187](/packages/knplabs-github-api)[facebook/php-business-sdk

PHP SDK for Facebook Business

90121.9M34](/packages/facebook-php-business-sdk)[meilisearch/meilisearch-php

PHP wrapper for the Meilisearch API

73813.7M114](/packages/meilisearch-meilisearch-php)[google/gax

Google API Core for PHP

263103.1M452](/packages/google-gax)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
