← すべての統合
Tier 2 — Full Deakee partner

WooCommerce

WordPress + WooCommerce

A drop-in WordPress plugin that runs your loyalty program end-to-end inside WooCommerce. Customers earn points on every order (centralized — stored in your DB). At any time they can connect their Deakee wallet and bridge points on-chain to trade across the Deakee network — and bring them back when they want to spend at your store again.

Download
Upload via WordPress → Plugins → Add New
GitHub でソースを見る →

2 つの統合モード

同じプラグインコードが両モードをサポート。今日は OAuth2 モードで開始し、後で設定切り替えでブリッジを追加 — データ移行不要。

OAuth2 モード
予定

あなたの DB に集中型ロイヤルティ、OAuth2 で Deakee と同期。チェーンもエクスチェンジも使いません — でも顧客は Deakee で残高を見られ、Deakee バウチャーを受け取れます。

  • 現在の deakee.com/api/oauth/* バックエンドで動作。
  • トークン無し、発行者としての法的リスク無し。
  • 設定切り替えでブリッジモードにアップグレード可能。
ブリッジモード
予定

ERC-8063 コントラクトをデプロイ。顧客は集中型残高をオンチェーントークンに変換し、Deakee エクスチェンジで取引できます。

  • エクスチェンジ上場とクロスブランド引き換えを追加。
  • Deakee リレイヤーが必要(未公開)。
  • OAuth2 モードと同じプラグインコード — 準備ができたら有効化。

インストール

  1. Download the plugin zip (or clone from GitHub).
  2. Upload via WordPress → Plugins → Add New → Upload Plugin → activate.
  3. WooCommerce → Deakee Loyalty: set earn rate, redemption rules, and paste your Deakee partner API key.
  4. Click "Deploy My Token" to create your brand's ERC-8063 contract on Sepolia (one-time).
  5. Done — customers earn on every order; the "Send to Deakee" button shows up in their account page for bridging.

// Earn is centralized — no chain involvement:
add_action('woocommerce_order_status_completed', function($order_id) {
  $order = wc_get_order($order_id);
  $points = DeakeeLoyalty::computePoints($order->get_total_cents());
  DeakeeLoyalty::members()->credit(
    $order->get_user_id(),
    $points,
    "wc_order_$order_id",
  );
});

// Bridge is user-initiated — fires only when the customer
// clicks "Send N points to my Deakee wallet" in their account:
DeakeeLoyalty::bridge()->withdraw($user_id, $amount);

Deakee がプラグインに接続する方法

パートナー API キーで Deakee リレイヤーへの呼び出しを認証します。OAuth2 の authorize/token URL は顧客ごとに 1 回、ウォレットアドレスの取得に使用されます(スコープ:identity のみ)。

authorize_urlhttps://deakee.com/oauth2/authorize (scope=identity, one-time wallet link)
token_urlhttps://deakee.com/oauth2/token
api_base_urlhttps://deakee.com/api/relayer/v1 (mint, burn, deploy)

適合性を検証

本番公開の前に公式の適合性検証ツールを実行してください。集中型台帳、identity OAuth フロー、ブリッジの mint/burn 接続、冪等性を検査します。

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

困っていますか? 完全な README を読むか、github.com/deakee/loyalty/issues で issue を開いてください。