.claude/skills/add-payment-flow/SKILL.md
Scaffold a payment gateway integration (HyperPay/Moyasar) with checkout, webhook, and transaction tracking. Use when adding payment capabilities.
npx skillsauth add malhajri07/real-estate-CRM-project add-payment-flowInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Integrates a Saudi-compatible payment gateway for processing earnest money, commissions, or subscription fees. Supports mada, Visa, Mastercard, and Apple Pay.
Create the transactions model via /add-prisma-model:
model transactions {
id String @id @default(uuid())
amount Decimal
currency String @default("SAR")
status String @default("PENDING") // PENDING, COMPLETED, FAILED, REFUNDED
gatewayRef String?
gatewayData Json?
entityType String // "deal", "subscription", "invoice"
entityId String
userId String
organizationId String?
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
}
Create payment service at apps/api/libs/payment-gateway.ts:
initiateCheckout(amount, currency, entityType, entityId) → returns checkout URLverifyPayment(gatewayRef) → returns statusprocessRefund(transactionId) → initiates refundCreate API routes at apps/api/routes/payments.ts:
POST /api/payments/initiate — create checkout session, return redirect URLPOST /api/payments/webhook — gateway callback (no auth, verify signature)GET /api/payments/transactions — list user/org transactionsPOST /api/payments/:id/refund — admin-only refundCreate checkout page at apps/web/src/pages/platform/checkout.tsx:
Add environment variables:
HYPERPAY_ENTITY_ID=...
HYPERPAY_ACCESS_TOKEN=...
HYPERPAY_BASE_URL=https://test.oppwa.com # sandbox
/typecheck passestesting
Create and edit Obsidian Flavored Markdown with wikilinks, embeds, callouts, properties, and other Obsidian-specific syntax. Use when working with .md files in Obsidian, or when the user mentions wikilinks, callouts, frontmatter, tags, embeds, or Obsidian notes.
tools
Interact with Obsidian vaults using the Obsidian CLI to read, create, search, and manage notes, tasks, properties, and more. Also supports plugin and theme development with commands to reload plugins, run JavaScript, capture errors, take screenshots, and inspect the DOM. Use when the user asks to interact with their Obsidian vault, manage notes, search vault content, perform vault operations from the command line, or develop and debug Obsidian plugins and themes.
data-ai
Create and edit Obsidian Bases (.base files) with views, filters, formulas, and summaries. Use when working with .base files, creating database-like views of notes, or when the user mentions Bases, table views, card views, filters, or formulas in Obsidian.
tools
Create and edit JSON Canvas files (.canvas) with nodes, edges, groups, and connections. Use when working with .canvas files, creating visual canvases, mind maps, flowcharts, or when the user mentions Canvas files in Obsidian.