PHPackages                             mootaco/moota-php-sdk - 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. mootaco/moota-php-sdk

ActiveLibrary[API Development](/categories/api)

mootaco/moota-php-sdk
=====================

Moota PHP SDK

2.0.1(4y ago)34.4k—5.4%2[1 issues](https://github.com/moota-co/moota-php-sdk/issues)MITPHPPHP &gt;=8

Since Oct 1Pushed 1y ago2 watchersCompare

[ Source](https://github.com/moota-co/moota-php-sdk)[ Packagist](https://packagist.org/packages/mootaco/moota-php-sdk)[ RSS](/packages/mootaco-moota-php-sdk/feed)WikiDiscussions master Synced yesterday

READMEChangelog (3)Dependencies (4)Versions (11)Used By (0)

Moota-PHP-Sdk
=============

[](#moota-php-sdk)

[Moota.co](https://moota.co) ❤️ PHP Native!

[![PHP version](https://camo.githubusercontent.com/eaa478f31d7e128350eb98d9a2fff5db785dafd8618b51f096cf5f9be6bd3582/68747470733a2f2f62616467652e667572792e696f2f70682f6d6f6f74612e737667)](https://badge.fury.io/ph/mootaco/moota-php-sdk)[![Latest Stable Version](https://camo.githubusercontent.com/2bb340fa12c4cbd2e8bf0751dc43ec86bdbdff8f6a20464e8fabfbf6599e8316/68747470733a2f2f706f7365722e707567782e6f72672f6d6f6f7461636f2f6d6f6f74612d7068702d73646b2f762f737461626c65)](https://packagist.org/packages/mootaco/moota-php-sdk)[![Monthly Downloads](https://camo.githubusercontent.com/346c0549dea7a025a25ea8a37c0c13fe88ad7502d0443ba3b141afa613a2f7c5/68747470733a2f2f706f7365722e707567782e6f72672f6d6f6f7461636f2f6d6f6f74612d7068702d73646b2f642f6d6f6e74686c79)](https://packagist.org/packages/mootaco/moota-php-sdk)[![Total Downloads](https://camo.githubusercontent.com/4eba12f58c886fd69fc4c57633405fe4ca98a9da507da0869c8283dfecfce1c6/68747470733a2f2f706f7365722e707567782e6f72672f6d6f6f7461636f2f6d6f6f74612d7068702d73646b2f646f776e6c6f616473)](https://packagist.org/packages/mootaco/moota-php-sdk)

[![](https://github.com/moota-co/moota-php-sdk/raw/master/tests/Mocking/img/moota-php-sdk.png)](https://app.moota.co)

This is the Official PHP wrapper/library for Moota API V2, that is compatible with Composer. Visit  for more information about the product.

Support us Data Transfer Object
----------------------------------------------

[](#support-us-data-transfer-object)

- of this package only supports `php:^>=8`
- need old version `php:^= **Note:** If you are using Laravel framework, in [some](https://laracasts.com/discuss/channels/general-discussion/using-non-laravel-composer-package-with-laravel?page=1#reply=461608) [case](https://stackoverflow.com/a/23675376) you also need to run `composer dumpautoload`

### 1.b Manual Instalation

[](#1b-manual-instalation)

If you are not using Composer, you can [clone](https://github.com/moota-co/moota-php-sdk) this repository.

Then you should require/autoload `Mutation.php` of etc class file on your code.

```
require __DIR__ . '/../vendor/autoload.php';

// my code goes here
```

2. How to Use
-------------

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

### 2.1 General Settings

[](#21-general-settings)

```
// Set your API V2 Server Key
\Moota\Moota\Config\Moota::$ACCESS_TOKEN = '';
```

### 2.2 Choose Class Method

[](#22-choose-class-method)

#### 2.2.1 Authentication

[](#221-authentication)

```
$auth = new \Moota\Moota\Domain\Auth();
try {
    $getSecretToken = $auth->login(
       new \Moota\Moota\DTO\Auth\LoginData(
                'user@moota.co',
                'password_hash',
                new \Moota\Moota\DTO\Auth\ScopesData(  true )
            )
    );
    // set to \Moota\Moota\Config::$ACCESS_TOKEN = $getSecretToken['access_token'];
} catch (\Moota\Moota\Exception\MootaException $exception) {
    // handling fail authentication
}
```

#### Destroy Auth Token

[](#destroy-auth-token)

```
$getSecretToken = new \Moota\Moota\Domain\Auth();
$getSecretToken->logout();
```

#### 2.2.2 Bank Account

[](#222-bank-account)

```
$bank_account = new \Moota\Moota\Domain\BankAccount();
```

```
// store bank account
try {
    $bank_account->storeBankAccount(
        new \Moota\Moota\DTO\BankAccount\BankAccountStoreData(
            "",
            Moota::BANK_TYPES[0], // list of bank type
            "loream",  //for gojek and ovo fill with mobile phone number
            "your password",
            "loream kasma",
            "16899030",
            true
        )
    );
 } catch (\Moota\Moota\Exception\MootaException $exception) {
    print_r($exception->getPharseErrors());
 }
```

body parameter storeBankAccount() reference [here](src/DTO/BankAccount/BankAccountStoreData.php)

```
// update bank account
try {
    $bank_account->updateBankAccount(
        new \Moota\Moota\DTO\BankAccount\BankAccountUpdateData(
           "hashing_qwopejs_id",
            "jhon",  //for gojek and ovo fill with mobile phone number
            "",
            "",
            "",
            "",
            ""
            )
    );
 } catch (\Moota\Moota\Exception\MootaException $exception) {
    print_r($exception->getPharseErrors());
 }
```

body parameter updateBankAccount() reference [here](src/DTO/BankAccount/BankAccountUpdateData.php)

```
// get list bank account
try {
    $bank_account->getBankList();
 } catch (\Moota\Moota\Exception\MootaException $exception) {
    print_r($exception->getPharseErrors());
 }
```

```
// can't wait for new mutation data use method refresh mutation
try {
    $bank_account->refreshMutation('');
 } catch (\Moota\Moota\Exception\MootaException $exception) {
    print_r($exception->getPharseErrors());
 }
```

```
// want to remove bank account from moota ?
try {
    $bank_account->destroyBankAccount('');
 } catch (\Moota\Moota\Exception\MootaException $exception) {
    print_r($exception->getPharseErrors());
 }
```

```
// want to activate my wallet account ovo or gojek please request otp code first
try {
    $otp_code = $bank_account->bankEwalletRequestOTPCode('');

    $bank_account->bankEwalletVerificationOTPCode(
        new \Moota\Moota\DTO\BankAccount\BankAccountEwalletOtpVerification('', '')
    );
 } catch (\Moota\Moota\Exception\MootaException $exception) {
    print_r($exception->getPharseErrors());
 }
```

#### 2.2.3 Mutation

[](#223-mutation)

```
$mutation = new \Moota\Moota\Domain\Mutation();
```

```
// get my mutation
$my_mutation = $mutation->getMutations(
    new \Moota\Moota\DTO\Mutation\MutationQueryParameterData(
            'asdasd',
            '2021-09-21',
            'Testing Note Mutation',
            '2000123',
            'CR'
        )
);
```

mutation query parameter getMutations() reference [here](src/DTO/Mutation/MutationQueryParameterData.php)

```
// Determine dummy mutation for debugging
$my_mutation = $mutation->storeMutation(
    new \Moota\Moota\DTO\Mutation\MutationStoreData(
        // fill mutation value here
    )
);
```

mutation parameter on storeMutation() reference [here](src/DTO/Mutation/MutationStoreData.php)

```
// Add note mutation
$my_mutation = $mutation->addNoteMutation(
    new \Moota\Moota\DTO\Mutation\MutationNoteData(
            'hash_mutation_id',
            'Testing Note Mutation',
        )
);
```

mutation parameter on addNoteMutation() reference [here](src/DTO/Mutation/MutationNoteData.php)

```
// Debugging | try getting mutation webhook from moota
$my_mutation = $mutation->pushWebhookByMutation('');
```

```
/**
* need to remove mutation data ?
* method destroy mutation can multiple remove mutation
*/
$my_mutation = $mutation->destroyMutation(
    new \Moota\Moota\DTO\Mutation\MutationDestroyData(
           ["hash_mutation_id", "hash_mutation_id"]
        )
);
```

mutation parameter on destroyMutation() reference [here](src/DTO/Mutation/MutationDestroyData.php)

```
// method attach tagging to mutation

$my_mutation = $mutation->attachTagMutation(
    new \Moota\Moota\DTO\Mutation\MutationAttachTaggingData(
            '8aolk43WJxM',
            [
                "assurance", "..."
            ]
        )
);
```

mutation parameter on attachTagMutation() reference [here](src/DTO/Mutation/MutationAttachTaggingData.php)

```
// method detach tagging from mutation

$my_mutation = $mutation->detachTagMutation(
    new \Moota\Moota\DTO\Mutation\MutationDetachTaggingData([
            '8aolk43WJxM',
            [
                "assurance", "..."
            ]
        )
);
```

mutation parameter on detachTagMutation() reference [here](src/DTO/Mutation/MutationDetachTaggingData.php)

```
// method update tagging from mutation

$my_mutation = $mutation->updateTagMutation(
    new \Moota\Moota\DTO\Mutation\MutationUpdateTaggingData([
            '8aolk43WJxM',
            [
                "assurance", "..."
            ]
        )
);
```

mutation parameter on updateTagMutation() reference [here](src/DTO/Mutation/MutationUpdateTaggingData.php)

#### 2.2.4 Tagging

[](#224-tagging)

```
$tagging = new \Moota\Moota\Domain\Tagging();
```

```
$my_tagging = $tagging->getTaggings(
    new \Moota\Moota\DTO\Tagging\TaggingQueryParameterData(
            ['assurance', 'cash'] // or leave blank doesn`t have filter
        )
);
```

tagging parameter on getTaggings() reference [here](src/DTO/Tagging/TaggingQueryParameterData.php)

```
// create first tagging like it
$my_tagging = $tagging->storeTagging(
    new \Moota\Moota\DTO\Tagging\TaggingStoreData(
            'assurance'
        )
);
```

tagging parameter on storeTagging() reference [here](src/DTO/Tagging/TaggingStoreData.php)

```
// update tagging like it
$my_tagging = $tagging->updateTagging(
    new \Moota\Moota\DTO\Tagging\TaggingUpdateData(
           'VLagzqBj42Ds',
            'assurance-car'
        )
);
```

tagging parameter on updateTagging() reference [here](src/DTO/Tagging/TaggingUpdateData.php)

```
// update tagging like it
$my_tagging = $tagging->destroyTagging('');
```

#### 2.2.5 Topup

[](#225-topup)

you can add bank account and getting mutation from bank account must be have point please TOPUP Point First!

```
$topup = new \Moota\Moota\Domain\Topup();
```

```
// Get list payment method | targeting bank account topup point
$payment_method = $topup->getPaymentMethod();
```

```
// Get List Amounts Point | minimum and maximum point can topup
$amounts = $topup->getListAmountPoint();
```

```
// get my topup
$my_topup = $topup->getListTopupPoint();
```

```
// create topup point
$my_topup = $topup->createTopupPoint(
    new \Moota\Moota\DTO\Topup\CreateTopupData(
            100000,
            'bca'
        )
);
```

topup parameter on createTopupPoint() reference [here](src/DTO/Topup/CreateTopupData.php)

```
// have a voucher code ?
$my_topup = $topup->redeemVoucher(
    new \Moota\Moota\DTO\Topup\VoucherRedeemData(
          'abcd'
        )
);
```

topup parameter on redeemVoucher() reference [here](src/DTO/Topup/VoucherRedeemData.php)

#### 2.2.6 Transaction

[](#226-transaction)

you can get history transaction of point here

```
$transaction = new \Moota\Moota\Domain\Transaction();

$history = $transaction->getHistoryTransactionPoint(
    new \Moota\Moota\DTO\Transaction\TransactionHistoryData(
             1,
             '',
            ''
        )
);
```

transaction parameter on getHistoryTransactionPoint() reference [here](src/DTO/Transaction/TransactionHistoryData.php)

#### 2.2.7 User

[](#227-user)

you can get profile information here

```
$user = new \Moota\Moota\Domain\User();

$my_profile = $transaction->getProfile();

$my_profile = $transaction->updateProfile(
    new \Moota\Moota\DTO\User\UserUpdateData(
            'moota',
            'email@moota.co',
            '12312312123123',
            'Jl. street no 1'
        )
);
```

User parameter on updateProfile() reference [here](src/DTO/User/UserUpdateData.php)

#### 2.2.8 Webhook

[](#228-webhook)

```
$webhook = new \Moota\Moota\Domain\Webhook();
```

```
$response = $webhook->getListWebhooks(
    new \Moota\Moota\DTO\Webhook\WebhookQueryParameterData(
        '',
        '',
         1,
        20
    )
);
```

```
try {
    $response = $webhook->storeWebhook(
        new \Moota\Moota\DTO\Webhook\WebhookStoreData(
                'https://app.moota.co/endpoint/webhook',
               'akjsdkj3',
                1,
               999,
                'credit',
                '', // leave blank webhook can set for all banks account
            )
    );
 } catch (\Moota\Moota\Exception\MootaException $exception) {
    print_r($exception->getPharseErrors());
 }
```

```
$response = $webhook->removeWebhook('');
```

```
$response = $webhook->getWebhookHistory('');
```

Retrieve webhook response like it

```
$webhook = new \Moota\Moota\Domain\Webhook('');

try {
    $response_payload_json = file_get_contents("php://input");
    $get_signature_from_header = getallheaders()['Signature'];

    $webhooks = $webhook->getResponse($get_signature_from_header, $response_payload_json);

    foreach ($webhooks as $webhook) {
        // code store to database
    }
} catch (\Moota\Moota\Exception\Webhook\WebhookValidateException $exception) {
    // code handling when incoming webhook fail validation signature
    print_r($exception->getMessage())
}
```

Unit Test
---------

[](#unit-test)

### All Test

[](#all-test)

`./vendor/bin/phpunit`

### Specific Test

[](#specific-test)

`./vendor/bin/phpunit --filter methodname`

Contributing
------------

[](#contributing)

Questions?
----------

[](#questions)

If you have any questions please [open an issue](https://github.com/moota-co/moota-php-sdk/issues/new).

###  Health Score

33

—

LowBetter than 72% of packages

Maintenance24

Infrequent updates — may be unmaintained

Popularity27

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity57

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 84.4% 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.

###  Release Activity

Cadence

Every ~28 days

Recently: every ~37 days

Total

8

Last Release

1534d ago

Major Versions

1.2.0 → 2.0.02021-11-23

1.2.1 → 2.0.12022-03-18

PHP version history (3 changes)1.0.0PHP 8.0.\*

1.1.0PHP &gt;=7.1

2.0.0PHP &gt;=8

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1118395?v=4)[moota](/maintainers/moota)[@moota](https://github.com/moota)

---

Top Contributors

[![gyugie](https://avatars.githubusercontent.com/u/21019166?v=4)](https://github.com/gyugie "gyugie (38 commits)")[![erkurn](https://avatars.githubusercontent.com/u/2738865?v=4)](https://github.com/erkurn "erkurn (5 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (2 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/mootaco-moota-php-sdk/health.svg)

```
[![Health](https://phpackages.com/badges/mootaco-moota-php-sdk/health.svg)](https://phpackages.com/packages/mootaco-moota-php-sdk)
```

###  Alternatives

[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3741.3M47](/packages/tencentcloud-tencentcloud-sdk-php)[neuron-core/neuron-ai

The PHP Agentic Framework.

2.0k656.1k38](/packages/neuron-core-neuron-ai)[avalara/avataxclient

Client library for Avalara's AvaTax suite of business tax calculation and processing services. Uses the REST v2 API.

528.5M7](/packages/avalara-avataxclient)[eslazarev/wildberries-sdk

Wildberries OpenAPI clients (generated).

273.0k](/packages/eslazarev-wildberries-sdk)[files.com/files-php-sdk

Files.com PHP SDK

2481.1k](/packages/filescom-files-php-sdk)[aimeos/prisma

A powerful PHP package for integrating media related Large Language Models (LLMs) into your applications

1943.1k5](/packages/aimeos-prisma)

PHPackages © 2026

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