PHPackages                             combindma/yotpo-api - 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. combindma/yotpo-api

AbandonedArchivedLibrary[API Development](/categories/api)

combindma/yotpo-api
===================

This is my package yotpo-api

1.0.12(4y ago)3101MITPHPPHP ^8.0

Since Oct 2Pushed 4y agoCompare

[ Source](https://github.com/combindma/yotpo-api)[ Packagist](https://packagist.org/packages/combindma/yotpo-api)[ Docs](https://github.com/combindma/yotpo-api)[ RSS](/packages/combindma-yotpo-api/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (4)Dependencies (9)Versions (5)Used By (0)

Yotpo Core API V3 &amp; Loyalty &amp; Referrals API implementation for Laravel
==============================================================================

[](#yotpo-core-api-v3--loyalty--referrals-api-implementation-for-laravel)

[![Latest Version on Packagist](https://camo.githubusercontent.com/b9581021f08b50a0054bc21760233fd5dba29f6e1865165d7458a35cd7ac9118/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f636f6d62696e646d612f796f74706f2d6170692e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/combindma/yotpo-api)[![GitHub Code Style Action Status](https://camo.githubusercontent.com/35fbdd3b2e059821a5ce62f834474abbbc62a4ccfbe3bc9c992c3a9abcbcfc02/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f776f726b666c6f772f7374617475732f636f6d62696e646d612f796f74706f2d6170692f436865636b253230262532306669782532307374796c696e673f6c6162656c3d636f64652532307374796c65)](https://github.com/combindma/yotpo-api/actions?query=workflow%3A%22Check+%26+fix+styling%22+branch%3Amain)[![Total Downloads](https://camo.githubusercontent.com/bd82b575af0ee6939fb67d23e557fe20e50f1eae9cef68c91873fa11c2b58efd/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f636f6d62696e646d612f796f74706f2d6170692e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/combindma/yotpo-api)

Installation
------------

[](#installation)

You can install the package via composer:

```
composer require combindma/yotpo-api
```

You can publish the config file with:

```
php artisan vendor:publish --provider="Combindma\YotpoApi\YotpoApiServiceProvider" --tag="yotpo-config"
```

This is the contents of the published config file:

```
return [
    /*
    * Enable or disable Yotpo api. Useful for local development when runing tests.
    */
    'api_enabled' => env('YOTPO_API_ENABLED', false),

    /*
   * Enable or disable Yotpo Loyalty. Useful for local development when runing tests.
   */
    'loyalty_enabled' => env('YOTPO_LOYALTY_ENABLED', false),

    /*
    * Core API V3 Credentials
    */
    'app_key' => env('YOTPO_APP_KEY'),
    'secret_key' => env('YOTPO_SECRET_KEY'),

    /*
    * Loyalty & Referrals API Credentials
    */
    'loyalty_api_key' => env('LOYALTY_API_KEY'),
    'loyalty_guid_key' => env('LOYALTY_GUID_KEY'),

    /*
     * CDNs
     * */
    'loyalty_js_sdk_url' => env('LOYALTY_JS_SDK_URL'),
    'loyalty_modules_loader_url' => env('LOYALTY_MODULES_LOADER_URL'),

    /*
     * Refer link used by Loyalty Program
     * */
    'refer_link' => 'http://rwrd.io',

    /*
     * Default currency code you want to use. Make sure to have the same in your Yotpo Loyalty admin: https://loyalty.yotpo.com/general-settings
     * */
    'currency' => env('YOTPO_DEFAULT_CURRENCY', 'MAD'),

    /*
    * Default country code you want to use. This is important for API requests when submitting the phone number
    * */
    'country' => env('YOTPO_DEFAULT_COUNTRY', 'MA')
];
```

Usage
-----

[](#usage)

- You should create a free account in  and add your credentials in .env file
- You must add `Combindma\YotpoApi\Traits\YotpoCustomer` to user model or implement yours. Just be sure to have the same structure (same array keys).
- You must add `Combindma\YotpoApi\Traits\YotpoPurchase` to order model or implement yours. Just be sure to have the same structure (same array keys).

For further documentation

- Loyalty API Documentation:
- Core API V3 Documentation:

Example of use: create a customer in loyality program

```
use Combindma\YotpoApi\Facades\YotpoApi;

//yotpoApiData is implemented in Combindma\YotpoApi\Traits\YotpoCustomer. You can create yours.
YotpoApi::createOrUpdateLoyaltyCustomer($user->yotpoApiData());
```

Testing
-------

[](#testing)

```
composer test
```

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Credits
-------

[](#credits)

- [Combind](https://github.com/combindma)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

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 ~1 days

Total

4

Last Release

1685d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/31b418bcbabafab33631fd151a64d3e18035f728ad195814aa4656d862610fcd?d=identicon)[combindma](/maintainers/combindma)

---

Tags

laravelcombindmayotpo-api

###  Code Quality

TestsPHPUnit

Static AnalysisPsalm

Type Coverage Yes

### Embed Badge

![Health badge](/badges/combindma-yotpo-api/health.svg)

```
[![Health](https://phpackages.com/badges/combindma-yotpo-api/health.svg)](https://phpackages.com/packages/combindma-yotpo-api)
```

###  Alternatives

[combindma/laravel-facebook-pixel

Meta pixel integration for Laravel

4956.9k](/packages/combindma-laravel-facebook-pixel)[simplestats-io/laravel-client

Client for SimpleStats!

4515.5k](/packages/simplestats-io-laravel-client)[scalar/laravel

Render your OpenAPI-based API reference

6183.9k2](/packages/scalar-laravel)[njoguamos/laravel-plausible

A laravel package for interacting with plausible analytics api.

208.8k](/packages/njoguamos-laravel-plausible)[ryangjchandler/bearer

Minimalistic token-based authentication for Laravel API endpoints.

8129.8k](/packages/ryangjchandler-bearer)[codebar-ag/laravel-docuware

DocuWare integration with Laravel

1221.1k](/packages/codebar-ag-laravel-docuware)

PHPackages © 2026

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