Setup Lekirpayのロゴ

Setup Lekirpay

コミュニティ
afu-it
setup-lekirpay

公式LekirPayドキュメントを使ったLekirPay決済連携の設定、構築、デバッグ、レビュー、解説を支援します。OAuth2 client_credentialsアクセストークン、Send PaymentおよびSecure Send Payment API、HMAC-SHA256チェックサムのLekir-Signature、ホスト型チェックアウトのpayment_url、callback_url通知、redirect_urlとcancel_urlによるリダイレクト、Payment Statusの再照会、Payment Groups、sandbox/liveホスト、Client ID、Lekirkey、公式GiveWPプラグインを扱います。LekirPay Malaysia、Lekir Tech、FPX、クレジットカード決済、決済リンク、決済フォーム、寄付フォーム、コールバックによる決済確定、本番運用の準備に取り組む際にご利用ください。

Add to TypingMind

概要

公開者afu-it
リポジトリmalaysia-payment-gateway
スキル名setup-lekirpay
スター
74
フォーク
11
同梱ファイル
4
リンク
  • Markdown形式の指示

    モデルが必要に応じて読み込むSKILL.mdファイルです。関連するリクエストがあったときだけトークンを消費します。

  • どのLLMでも利用可能

    AIスキルはプロバイダー固有のコードではなく、通常のMarkdownなので、GPT、Claude、Gemini、Grok、ローカルモデルで利用できます。

  • 4個の同梱ファイル

    モデルが作業中に読み取れるスクリプト、テンプレート、参考資料です。ファイルは読み取り専用で、実行されることはありません。

  • オープンソース

    afu-itがGitHubで公開しています。インストールする前にソースを確認してください。

インストール

AIスキル「Setup Lekirpay」をTypingMindにインストールすれば、どのLLMでも利用できます。SKILL.mdを読み取れる別のAIエージェントに追加することもできます。

1

TypingMindにインストール

TypingMindはGitHubフォルダから直接スキルをインストールします。SKILL.mdを読み取り、リソースファイルをまとめてローカルに保存します。

  1. アプリを開き、「プラグイン」→「スキル」に移動します。
  2. 「GitHubからインストール」を選択します。
  3. 以下のスキルフォルダのURLを貼り付けて確定します。
    https://github.com/afu-it/malaysia-payment-gateway/tree/main/setup-lekirpay
  4. スキルを利用したいチャットごとに、そのスキルを有効にしてください。
「プラグイン」→「スキル」→「スキルを追加」→「GitHubのURLから」を選択し、フォルダのURLを貼り付けて「続行」を押します。
2

別のAIエージェントにインストール

Agent Skills形式を読み取れるAIエージェントなら、このスキルを利用できます。フォルダをそのAIエージェントのスキルディレクトリにコピーしてください。

Claude Code — .claude/skills
git clone --depth 1 https://github.com/afu-it/malaysia-payment-gateway.git /tmp/malaysia-payment-gateway
mkdir -p .claude/skills
cp -r /tmp/malaysia-payment-gateway/setup-lekirpay .claude/skills/setup-lekirpay
コピー後、新しいスキルを読み込むためにClaude Codeを再起動してください。

TypingMindで使用

TypingMindのチャットでSetup Lekirpayを有効にするだけで、あとはモデルが対応します。名前と説明がシステムプロンプトに含まれ、関連するリクエストがあると、モデルが指示の全文を自動で読み込みます。手動で呼び出す必要はなく、実際に使用されるまでトークンを消費しません。

関連するリクエストがあるとすぐに、モデルが自動的にSetup Lekirpayを読み込みます。

どのAIモデルでも利用可能

AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、Setup Lekirpayは作成時に想定されたモデルに縛られません。TypingMindに一度インストールすれば、ご自身のAPIキーを使って、GPT-5、Claude、Gemini、Grok、DeepSeek、Mistral、Llama、またはご自身で実行するローカルモデルで利用できます。

  • 必要なときだけ読み込み

    システムプロンプトには名前と説明だけが含まれます。関連するリクエストが初めてあったときに指示を取得するため、スキルを使わない間は指示の読み込みにトークンを消費しません。

  • チャットの途中でモデルを切り替え

    スキルはコードではなく指示なので、モデルを切り替えてもそのまま使えます。次のモデルも同じSKILL.mdを読み込みます。

スキルの指示

モデルが読み込むSKILL.mdの内容です。スキルはモデルが従う指示なので、インストールする前に確認してください。

LekirPay Payment Gateway

Use this skill for LekirPay (Lekir Tech (M) Sdn Bhd) payment gateway integration work.

Source

Read references/lekirpay-api.md before giving factual API guidance or writing integration code. It holds the endpoint catalogue, base URLs, token flow, full request/response field tables, the Lekir-Signature checksum algorithm with a verified worked example, callback fields, status values, and documented gaps.

Read references/account-setup.md when the user asks how to register, where the Client ID, Lekirkey and Lekir-Signature key live, sandbox vs live, env var names, payment methods, refunds, settlement, or pricing.

Read references/source-map.md to pick the right official page, and to see which doc pages are hidden or legacy.

Core Workflow

  1. Identify environment: sandbox (https://sandbox.lekirpay.com) or live (https://app.lekirpay.com). Confirm the sandbox host responds before relying on it.
  2. Confirm the merchant profile is verified; the payment APIs refuse unverified profiles.
  3. Get credentials from the dashboard API tab: ID (client_id), Lekirkey (client_secret), Lekir-Signature key.
  4. Create a local pending payment with a unique reference_no (max 140 characters) and the exact amount string.
  5. Request a Bearer token: POST /oauth/token with grant_type=client_credentials, client_id, client_secret. Cache it server-side (documented expires_in 1296000 s, 15 days).
  6. Create the payment server-side with POST /api/payments/payment/secure (preferred, sends checksum) or POST /api/payments/payment.
  7. Store payment_id, then redirect the customer to payment_url.
  8. On callback_url POST (and on redirect_url return), treat the payload as untrusted: it carries no documented signature.
  9. Requery GET /api/payments/{payment_id}/status with the Bearer token; settle only when status is Paid and payment_id, reference_no, and amount match the local record.
  10. Settle idempotently; callback, redirect and manual requery may all arrive for the same payment.

Core Facts

  • Live API base: https://app.lekirpay.com/api. Sandbox API base (docs): https://sandbox.lekirpay.com/api.
  • Token endpoint (live): POST https://app.lekirpay.com/oauth/token; response token_type Bearer, expires_in, access_token.
  • Create payment: POST /api/payments/payment; signed variant: POST /api/payments/payment/secure.
  • Required create fields: item, amount, reference_no, callback_url, email, name (plus checksum on /secure).
  • Create response: payment_id, reference_no, payment_url, status (created), created_date.
  • Checksum: HMAC-SHA256 (hex) with the Lekir-Signature key over amount{amount}|email{email}|item{item}|name{name}|callback_url{callback_url}|reference_no{reference_no} in that fixed order.
  • Callback: LekirPay POSTs payment_id, reference_no, trx_no, merchant_name, amount, name, email, phone, item, timestamp, payment_method, status, type (callback or redirect) on success or failure.
  • Status requery: GET /api/payments/{payment_id}/status; statuses Created, Proceed, Paid, Failed.
  • method (GET or POST, default POST) controls how data is sent to the redirect.
  • Amount is a ringgit decimal (double), not sen. Website states MYR only.
  • API accepts application/x-www-form-urlencoded and application/json; documented HTTP codes are 200 and 400.
  • Payment Groups: POST /api/payment_group/create, GET /api/payment_group/data; pass group_id on create payment.
  • No refund, recurring, tokenisation, or webhook-signature API is documented.

Critical Rules

  • Keep client_secret (Lekirkey), the Lekir-Signature key and access tokens server-side only.
  • Never mark paid from the callback body, the redirect_url hit, or status in a POST alone; always requery the status API.
  • Compare status case-insensitively (created in create responses, Paid in the official plugin check).
  • Build the checksum string from the exact values you send (same amount formatting, same callback_url with scheme); do not sort keys alphabetically even though the docs prose says "ascending".
  • Make reference_no unique per attempt and use it to map callbacks back to local orders.
  • Return HTTP 200 quickly from the callback; do the requery and settlement idempotently.
  • Do not call the hidden bulk payout or transfer pages (lekirpay.co); they are legacy and the host does not resolve.
  • Do not copy the GiveWP plugin's secure-payment code: it never calls /secure and uses an undefined key variable.
  • Verify current sandbox availability, plan (cards need Enterprise), and settlement terms with LekirPay before claiming production certainty.

Completion Criteria

A LekirPay integration is done only when:

  1. Token request and payment creation run server-side; the token is cached and refreshed before expiry.
  2. Local pending payment with unique reference_no and expected amount exists before redirecting to payment_url.
  3. checksum (if using /secure) is computed over the documented fixed-order string and unit-tested against the doc example.
  4. Callback and redirect handlers requery GET /api/payments/{payment_id}/status and check payment_id, reference_no, amount and Paid status.
  5. Settlement is idempotent across callback, redirect, and retry.
  6. Tests cover forged callback (status Paid but API says otherwise), wrong amount, wrong reference, Failed status, duplicate callback, expired token.
  7. Deployment docs list LEKIRPAY_BASE_URL, LEKIRPAY_CLIENT_ID, LEKIRPAY_CLIENT_SECRET, LEKIRPAY_SIGNATURE_KEY, callback URL, redirect URL, and sandbox/live separation.

Loophole Review Loop

When asked whether a LekirPay strategy is "100% confident", run this loop until no factual gaps remain:

  1. List trust boundaries: browser redirect, payment_url page, backend creator, token cache, LekirPay API, callback receiver, status requery, database, fulfilment job, dashboard settings.
  2. Check bypasses: forged callback POST (no signature), fake redirect POST with status=Paid, payment_id swapped to another merchant order, amount tampering, reused reference_no, stale token, sandbox/live mix, case-sensitive status compare, duplicate callback, callback for Failed after Paid, unverified profile, card payment on a plan without cards.
  3. Add fixes: server-side creation, local pending record, status requery as the only truth, strict payment_id/reference_no/amount match, unique constraint on payment_id, durable event log, token refresh, separate env config.
  4. Re-read references/lekirpay-api.md sections relevant to any gap.
  5. State remaining uncertainty: callback retry policy, expected callback response, error body shape, sandbox host status, refund process, and settlement schedule are not documented.

同梱ファイル

スキルが読み込まれている間、モデルは必要に応じてこれらを読み取ります。読み取り可能なファイルとして提供され、実行されることはありません。

よくある質問

AIスキル「Setup Lekirpay」では何ができますか?

公式LekirPayドキュメントを使ったLekirPay決済連携の設定、構築、デバッグ、レビュー、解説を支援します。OAuth2 client_credentialsアクセストークン、Send PaymentおよびSecure Send Payment API、HMAC-SHA256チェックサムのLekir-Signature、ホスト型チェックアウトのpayment_url、callback_url通知、redirect_urlとcancel_urlによるリダイレクト、Payment Statusの再照会、Payment Groups、sandbox/liveホスト、Client ID、Lekirkey、公式GiveWPプラグインを扱います。LekirPay Malaysia、Lekir Tech、FPX、クレジットカード決済、決済リンク、決済フォーム、寄付フォーム、コールバックによる決済確定、本番運用の準備に取り組む際にご利用ください。

TypingMindでSetup Lekirpayを使うメリットは何ですか?

一度インストールすれば、どのモデルでも使えるからです。Setup Lekirpayはプロバイダー固有のコードではなく、通常のMarkdownで記述されているため、同じスキルをGPT-5、Claude、Gemini、Grok、ローカルモデルで利用できます。チャットの途中でモデルを切り替えても、そのまま使い続けられます。TypingMindは自分のAPIキーで動作するため、シート単位のサブスクリプションではなく、プロバイダーに直接料金を支払います。スキルとチャットは自分のストレージに保持されます。

TypingMindにSetup Lekirpayをインストールするにはどうすればよいですか?

TypingMindで「プラグイン」→「スキル」→「GitHubからインストール」を開き、https://github.com/afu-it/malaysia-payment-gateway/tree/main/setup-lekirpayを貼り付けてください。TypingMindがSKILL.mdを読み込み、関連ファイルをまとめて、チャットごとに有効にできるスキルとしてインストールします。

Setup Lekirpayを使えるAIモデルはどれですか?

TypingMindに接続したどのモデルでも利用できます。AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、GPT、Claude、Gemini、Grok、ローカルモデルのいずれも、リクエストの内容がこのスキルの用途に合ったときに、このスキルを読み込めます。

Setup Lekirpayで使えるAIモデルの数に制限はありますか?

数に制限はありません。スキルに対応したモデルであれば、GPT、Claude、Gemini、Grok、DeepSeek、Mistral、Llamaなど、どのモデルでもSetup Lekirpayを利用できます。すべてTypingMind上で、自分のAPIキーを使って利用できます。

AIスキル「Setup Lekirpay」は無料ですか?

afu-itがGitHubで公開しています。ライセンス条件はリポジトリでご確認ください。ご利用のAIプロバイダーに支払うのは、使用したトークンの料金だけです。

AIスキルとは何ですか?

AIスキルは、特定のタスクの実行方法をAIモデルに教える、再利用可能な指示のセットです。オープンなAgent Skills形式に従い、名前と説明を含むSKILL.mdファイルに加え、モデルが必要とするスクリプト、テンプレート、参照ファイルで構成されます。モデルはリクエストがスキルに合致したときだけ指示を読み込むため、インストール済みのスキルも、使うまでは費用がかかりません。

AIスキルは、プラグインやMCPサーバーとどう違いますか?

プラグインやMCPサーバーは、モデルが呼び出せる新しいツールを提供します。ツールとは、どこかで実行され、結果を返すコードです。一方、AIスキルは、タスクへの取り組み方、従うべき手順、望ましい出力の例といった知識や進め方をモデルに伝えます。スキルは通常のMarkdownで記述されているため、サーバー、APIキー、実行環境は不要で、どのモデルでも利用できます。

すべて見る

今すぐ自分専用のAIワークスペースを作成

ニュースレターに登録すると、新機能や今後のプレゼント企画のお知らせが届きます👇