Quick Ref / Command

Engineer Kit

/ak:payment-integration

Checkout and payment integrations

Integrate checkout, QR payments, subscriptions, usage billing, license keys, webhooks, and multi-provider order flows across SePay, PayFS, Polar, Stripe, Creem, Dodo Payments, Lemon Squeezy, Paddle, and PayPal.

01

Define payment job

02

Select provider

03

Read provider refs

04

Model orders

Rule 01

Provider choice follows market and product model

Rule 02

Webhooks must be verified and idempotent

Rule 03

Order state is the durable source of truth

Rule 04

Multi-provider flows require explicit currency and lifecycle mapping

Execution Map

Core lanes from input to output, aligned with the command's real execution path.

01

Start

Input, scope, route

  1. 1 Define payment job Clarify checkout, subscription, webhook, VietQR, order management, benefits, or enterprise payment needs.
  2. 2 Select provider Choose SePay or PayFS for Vietnamese bank transfers and VietQR; Polar, Creem, Dodo Payments, Paddle, or Lemon Squeezy (existing stores only, maintenance mode) as Merchant of Record for SaaS and digital products; Stripe for enterprise and Connect; PayPal for wallet and card checkout where you own tax. Provider versions, limits, and fees are dated facts to recheck in official docs.
02

Work

Agent / skill execution

  1. 3 Read provider refs Load the relevant overview, API, SDK, webhook, product, checkout, subscription, or best-practices references.
  2. 4 Model orders Design products, pricing, currency, order state, transaction mapping, subscription lifecycle, and multi-provider normalization.
03

Verify

Gate, review, validation

  1. 5 Build checkout Create provider-specific checkout sessions, QR code flows, payment elements, or hosted checkout based on the selected platform.
  2. 6 Handle webhooks Verify signatures or provider payloads, make handlers idempotent, map events to orders, and persist state transitions.
04

Close

Report, handoff, artifact

  1. 7 Deliver benefits Provision SaaS access, GitHub/Discord benefits, receipts, renewal state, upgrade/downgrade paths, and failure recovery.
  2. 8 Verify production Test provider sandbox or local webhooks, rate limits, retries, duplicate events, currency rounding, and reconciliation.

Syntax, arguments, subcommands

How to invoke the skill: syntax, positional arguments, shared options, then each subcommand with its own syntax and outcome.

Syntax

/ak:payment-integration [provider] [task]

Arguments

[provider]

Provider

Names the payment provider or an intentional multi-provider boundary, such as SePay, PayFS, Polar, Stripe, Creem, Dodo Payments, Lemon Squeezy, Paddle, PayPal, or multi-provider orders.

/ak:payment-integration stripe Add a sandbox subscription checkout
[task]

Payment task

Describes the checkout, subscription, webhook, VietQR, order, refund, test, and authority contract to design or implement; do not include secrets.

/ak:payment-integration "stripe Add a sandbox subscription checkout and verify webhook signatures on the raw body"

Sample Prompt

Concrete invocations for each flag, subcommand, mode, or route available in the live workflow.

SePay QR Recommended
/ak:payment-integration SePay VietQR checkout for VND orders
Use when:
Use for Vietnamese bank-transfer payments and QR codes.
Expected:
Returns SePay references, a VietQR checkout flow, webhook verification steps, and durable order-state plan.
Polar SaaS
/ak:payment-integration Polar subscriptions with GitHub benefits
Use when:
Use for SaaS subscriptions and automated benefit delivery.
Expected:
Designs Polar checkout, subscription lifecycle handling, benefit delivery, webhook verification, and renewal-state mapping.
Stripe enterprise
/ak:payment-integration Stripe Connect marketplace payouts
Use when:
Use for complex global payment infrastructure or Connect platforms.
Expected:
Provides a Stripe integration path covering checkout, Connect payouts, local webhook testing, and reconciliation.
Merchant of Record SaaS
/ak:payment-integration Paddle subscriptions with proration for our SaaS plans
Use when:
Use when a Merchant of Record should handle tax and invoicing for SaaS or digital products.
Expected:
Builds Paddle.js checkout and multi-item subscriptions with proration, verifies Paddle-Signature webhooks within the timestamp tolerance, and keeps order amount and status server-owned.

Handled Scope

  • SePay and PayFS bank transfers and VietQR
  • Merchant of Record: Polar, Creem, Dodo Payments, Paddle, Lemon Squeezy
  • Stripe Checkout, Billing, and Connect
  • PayPal Orders and Subscriptions
  • Usage billing and license keys
  • Webhook verification
  • Multi-provider order management

Artifacts Produced

Payment Integration Output

Pattern

Provider-specific checkout + webhook + order-state implementation

A production payment change should include provider rationale, secure webhook handling, idempotent state transitions, and reconciliation/testing notes.

Next