# KiasiPay Agent Skills

> Read-only documentation for AI coding agents (Claude Code, Cursor and similar) integrating KiasiPay into a merchant's own site. Human docs: https://staging.kiasipay.com/developers

These files contain no code that runs on install and no credentials. Read them before installing, as you would any instructions you give your agent.

## kiasipay-checkout-integration

Integrate KiasiPay hosted checkout (M-PESA, Airtel Money, Pesalink bank transfer, instalment "book now, pay later" plans) into a merchant's own website or backend. Use when adding a KiasiPay pay button, creating checkout sessions server-side with an API token, redirecting a customer to a KiasiPay checkout link, confirming payment status, or handling paid, failed, pending or expired outcomes. Not for receiving webhooks (see kiasipay-webhooks).

- https://staging.kiasipay.com/developers/skills/kiasipay-checkout-integration/SKILL.md
- https://staging.kiasipay.com/developers/skills/kiasipay-checkout-integration/references/api.md
- https://staging.kiasipay.com/developers/skills/kiasipay-checkout-integration/references/outcomes-and-polling.md
- https://staging.kiasipay.com/developers/skills/kiasipay-checkout-integration/references/sdk.md
- https://staging.kiasipay.com/developers/skills/kiasipay-checkout-integration/references/testing.md

## kiasipay-webhooks

Receive and process KiasiPay outbound webhooks (payment.succeeded, payment.failed) on a merchant's server. Use when building or reviewing a KiasiPay webhook endpoint, verifying the X-KiasiPay-Signature HMAC-SHA256 header, preventing replays, de-duplicating deliveries, or fulfilling orders and instalment payments from webhook events. Not for creating checkout sessions (see kiasipay-checkout-integration).

- https://staging.kiasipay.com/developers/skills/kiasipay-webhooks/SKILL.md
- https://staging.kiasipay.com/developers/skills/kiasipay-webhooks/references/verification.md

## Install into a project

Claude Code reads skills from `.claude/skills/<name>/SKILL.md`. Other agents: copy the same files wherever your agent loads rules or skills from.

```bash
BASE=https://staging.kiasipay.com/developers/skills
for f in kiasipay-checkout-integration/SKILL.md kiasipay-checkout-integration/references/api.md kiasipay-checkout-integration/references/outcomes-and-polling.md kiasipay-checkout-integration/references/sdk.md kiasipay-checkout-integration/references/testing.md kiasipay-webhooks/SKILL.md kiasipay-webhooks/references/verification.md; do
  mkdir -p ".claude/skills/$(dirname "$f")"
  curl -fsSL "$BASE/$f" -o ".claude/skills/$f"
done
```
