setup-toyyibpay
Installation
SKILL.md
toyyibPay Payment Gateway
Use this skill for toyyibPay payment gateway integration work.
Source
Read references/toyyibpay-docs.md before giving factual API guidance or writing integration code. It contains source URLs, environment bases, endpoint map, callback hash rules, amount units, DuitNow QR fields, dashboard setup notes, pricing/support notes, WooCommerce setup notes, and WorkDo configuration notes from the provided docs plus follow-up source checks.
Read references/account-setup.md when user asks how to register, which API keys are needed, where credentials come from, or what dashboard setup is required.
Core Workflow
- Identify environment: sandbox at
dev.toyyibpay.comor production attoyyibpay.com. - Confirm credential scope: User Secret Key, Category Code, and optional Enterprise User Secret Key.
- Create or reuse a toyyibPay Category, then create local pending payment before creating a Bill.
- Create Bill server-side with fixed amount in cents, internal reference in
billExternalReferenceNo, return URL, and callback URL. - Redirect customer to
https://toyyibpay.com/{BillCode}or sandbox equivalent. - Verify callback hash with
MD5(userSecretKey + status + order_id + refno + "ok"). - Re-check payment using
getBillTransactionswhen possible, then settle idempotently after status, amount, channel, provider, and reference match.