← All integrations
Tier 2 — Full Deakee partner

Laravel

Laravel 10+ (any e-commerce layer)

For Laravel apps with their own checkout (Bagisto, Aimeos, custom). Publishes migrations for `deakee_loyalty_members` + `deakee_loyalty_transactions`, exposes a `DeakeeLoyalty` facade, fires `DeakeeLoyaltyEarned` + `DeakeeLoyaltyWithdrawn` events.

Composer
composer require deakee/loyalty-laravel
View source on GitHub →

Two integration modes

The same plugin code supports both modes. Start in OAuth2 mode today; layer in the bridge later as a config flip — no data migration.

OAuth2 mode
planned

Centralized loyalty in your DB synced to Deakee via OAuth2. No chain, no exchange — but customers see balances in Deakee and you can accept Deakee vouchers.

  • Works against today's deakee.com/api/oauth/* backend.
  • No tokens, no legal exposure as an issuer.
  • Upgrades to bridge mode in one config flip.
Bridge mode
planned

Deploy an ERC-8063 contract; customers can mint centralized balance to on-chain tokens and trade them on the Deakee exchange.

  • Adds exchange listing and cross-brand redemption.
  • Requires the Deakee relayer (not yet shipped).
  • Same plugin code as OAuth2 mode — opt in when ready.

Install

  1. composer require deakee/loyalty-laravel
  2. php artisan migrate
  3. Set DEAKEE_API_KEY in .env, run php artisan deakee:deploy-token (one-time).
  4. Call DeakeeLoyalty::credit() in your order-complete logic.
  5. Mount the bridge routes (one line in your routes file) to expose withdraw/deposit endpoints.

Example

use Deakee\Loyalty\Facades\DeakeeLoyalty;

// Centralized earn — no chain:
DeakeeLoyalty::members()->credit(
    userId: $order->user_id,
    points: DeakeeLoyalty::computePoints($order->total_cents),
    reference: "order_{$order->id}",
);

// User-initiated bridge (called from the customer's
// "Send to Deakee" form):
DeakeeLoyalty::bridge()->withdraw($user, $amount);

How Deakee connects to your plugin

Your partner API key authenticates calls to the Deakee relayer. The OAuth2 authorize/token URLs are used once per customer to fetch the wallet address (scope: identity only).

authorize_urlhttps://deakee.com/oauth2/authorize (scope=identity)
token_urlhttps://deakee.com/oauth2/token
api_base_urlhttps://deakee.com/api/relayer/v1

Verify conformance

Before going live, run the official conformance verifier against your deployment. It checks the centralized ledger, identity OAuth flow, bridge mint/burn wiring, and idempotency.

npx @deakee/loyalty-verifier \
  --partner-api-key   <your key> \
  --plugin-url        <your plugin URL> \
  --contract-address  <your ERC-8063 contract> \
  --test-user-email   test@example.com

Stuck? Read the full README or open an issue at github.com/deakee/loyalty/issues.