From fluxa-agent-payment-fluxa-ai-wallet-mcp
FluxA Agentic Checkout is a general-purpose checkout automation and human handoff runbook. Use it when an AI agent needs to open a product or checkout link, attempt deterministic Playwright checkout on currently supported surfaces, autofill contact, delivery, card, and billing fields, and stop in a clean handoff state when CAPTCHA, Cloudflare, OTP, 3DS, unsupported merchants, or store-specific flows require a human operator to finish the purchase.
npx claudepluginhub joshuarweaver/cascade-business-ops --plugin fluxa-agent-payment-fluxa-ai-wallet-mcpThis skill uses the workspace's default tool permissions.
**Skill version: 0.4.0** | **Product surface: deterministic checkout automation + explicit human handoff**
agents/openai.yamlreferences/current-capabilities.mdreferences/roadmap.mdrequirements.txtscripts/checkout_playwright_handoff.pyscripts/demo_execute_headed.pyscripts/order_manager.pyscripts/order_store.pyscripts/setup_checkout_profile.pyscripts/setup_checkout_skill.pyscripts/shopify/__init__.pyscripts/shopify/adapters/__init__.pyscripts/shopify/adapters/common.pyscripts/shopify/adapters/shop_pay_card.pyscripts/shopify/adapters/shopify_checkout_card.pyscripts/shopify/adapters/stripe_hosted.pyscripts/shopify/candidates.pyscripts/shopify/checkout.pyscripts/shopify/navigation.pyscripts/shopify/providers.pyCreates isolated Git worktrees for feature branches with prioritized directory selection, gitignore safety checks, auto project setup for Node/Python/Rust/Go, and baseline verification.
Executes implementation plans in current session by dispatching fresh subagents per independent task, with two-stage reviews: spec compliance then code quality.
Dispatches parallel agents to independently tackle 2+ tasks like separate test failures or subsystems without shared state or dependencies.
Skill version: 0.4.0 | Product surface: deterministic checkout automation + explicit human handoff
Use this skill as the release-grade operator runbook for checkout automation. It accepts arbitrary entry links, attempts the currently implemented automation routes, and produces structured results that tell the next agent or human whether the checkout is ready, partially filled, blocked by verification, or requires manual takeover.
python-dotenv, socksio, playwright, and related dependencies are already installed. If they are missing, install them first. See the Environment setup section for the setup steps.Collect the user's shipping information section and check whether the user already has a JSON file containing payment, delivery, and billing information. If not, guide the user to provide that information.Before starting, tell the user: "I’m starting the checkout automation now. I’ll begin in preview mode so I can autofill the checkout information without submitting the order."
Use the user-provided entry-url and the generated profile JSON file to run checkout_playwright_handoff.py in preview mode first, so you can confirm that the automation flow runs correctly and fills the required information.
python3 scripts/checkout_playwright_handoff.py \
--entry-url "https://shophomeplace.myshopify.com/products/gift-card" \
--mode preview \
--secrets-path /data/workspace/.clawdbot/credentials/real_card.json \
--resident-id-number "<required only when the merchant asks for it>" \
--out-dir artifacts/checkout-preview \
--headless \
--record-video
If preview succeeds, send the screenshots and video to the user so they can review the automated checkout preview, and tell the user: "The automated checkout preview completed successfully, and the checkout information has been filled in. Please confirm that the delivery information is correct. If everything looks right, we can proceed with the final checkout step."
Do not delete screenshots, traces, videos, or result JSON files under the local artifacts/ directory by default. They are part of the audit trail and manual handoff record for checkout continuation.
Only clean up local artifacts if the user explicitly asks for cleanup, or explicitly asks to delete sensitive files among them.
If the page contains a required checkbox for legal consent, privacy authorization, cross-border transfer, or other local regulatory requirements, do not check it on the user's behalf by default. First ask for the user's explicit consent in natural language. Only after the user clearly agrees should you add --confirm-legal-consent to the command.
If the user confirms that the delivery information is correct, run checkout_playwright_handoff.py in execute mode for the final checkout attempt. When using the standard unified profile that includes delivery, you should usually add --confirm-delivery; otherwise the script will refuse to run.
python3 scripts/checkout_playwright_handoff.py \
--entry-url "https://gracie-designs.myshopify.com/products/gift-card" \
--mode execute \
--secrets-path "$HOME/.clawdbot/credentials/real_card.json" \
--confirm-delivery \
--confirm-legal-consent \
--order-label "Gracie Designs Gift Card" \
--order-currency USD
unsupported_provider or needs_manual_verification only.
If the checkout page is already open but automation still cannot safely continue, return the live product or checkout link immediately so the user can finish manually.
Preferred wording:This merchant's current checkout flow is not yet within the validated automation scope of FluxA Agentic Checkout, so you will need to complete this purchase manually for now.
You can open the link below to continue the purchase:
<product-or-checkout-url>
python3 scripts/order_manager.py get --order-id CHK-1774977424895
python3 scripts/order_manager.py list --limit 20
python3 scripts/order_manager.py search --keyword "gift card"
python3 scripts/order_manager.py summary --days 30
phase, provider, handoffRequired, handoffReason, contactFilled, deliveryFilled, billingIdentityFilled, postalFilled, paymentFieldVerification, legalConsentChecked, and filledCheckoutScreenshot.
If handoffRequired=true, stop automation and pass the active context to a human operator instead of inventing a fallback flow.| Capability | What it does now | When to use |
|---|---|---|
| Checkout Routing | Accepts entry links and chooses the validated checkout route automatically | The caller already has a product, cart, or checkout URL |
| Deterministic Filling | Fills supported contact, delivery, billing identity, postal, and card fields on currently supported surfaces | The caller wants a stable, replayable automation path instead of free-form browsing |
| Profile Setup | Collects payment, delivery, and billing details into one reusable JSON credential file | The caller needs a repeatable setup flow before preview or execute |
| Operator Handoff | Emits structured handoff states instead of faking unsupported automation | Verification or merchant-specific steps block safe continuation |
| Artifacts & State | Saves JSON results, screenshots, traces, and optional video for inspection | The caller needs auditability, debugging, or clean manual continuation |
| Order Management | Stores successful paid checkout records inside the skill and exposes lookup commands | The caller needs a local ledger of paid orders after execute-mode success |
Use this section as the product truth. Do not claim support beyond it.
preview and executepayment, delivery, and billingphase, provider, handoffRequired, handoffReason, and completion hintsexecute runs can be recorded automatically into data/paid_orders/scripts/order_manager.py supports get, list, search, and summaryThese are expected handoff points, not bugs to paper over:
When these appear, stop and return the handoff state. Do not improvise a best-effort checkout flow.
This skill is an execution and handoff product, not a recommendation report.
artifacts/ by default; keep them available for user review, debugging, and manual continuation unless the user explicitly asks for cleanupdeliveryFilledpaymentFieldVerification for card-field confirmation instead of claiming the fields are empty from the screenshot alonelegalConsentCheckedexecute reaches success and order recording is enabled, include orderRecorded, orderId, orderPath, and orderStorageDir in the final resultorderRecordError without pretending the order was recordedscripts/checkout_playwright_handoff.py
General checkout entrypoint with automatic route selection, structured handoff signals, and optional paid-order recording on execute success.scripts/demo_execute_headed.py
One-command execute-mode demo wrapper with --headed, default demo URL, and visible browser hold-open time.scripts/setup_checkout_profile.py
Interactive setup flow that collects payment, delivery, and billing details into one reusable JSON profile.scripts/order_manager.py
Local paid-order query CLI for get, list, search, and summary.scripts/order_store.py
Filesystem-backed order ledger used by the checkout skill.scripts/shopify/
Bundled Playwright helpers for the currently validated checkout navigation routes and shared payment adapters.python3 scripts/setup_checkout_skill.py \
--profile-output "$HOME/.clawdbot/credentials/real_card.json"
This one command prepares the Python runtime, installs Playwright Chromium, and then starts the interactive profile setup flow.
Default checkout runs now use a 600 second timeout so slow stores are less likely to be cut off mid-run.
When automation is blocked, reply to the user in a customer-service tone and either ask for the missing checkout information or immediately return the live checkout link for manual completion.
Standard local setup:
python3 -m venv .venv
. .venv/bin/activate
python -m pip install -r requirements.txt
python -m playwright install chromium
Docker / OpenClaw setup:
apt-get update && apt-get install -y python3-pip python3-venv xauth
python3 -m pip install --break-system-packages playwright python-dotenv socksio
python3 -m playwright install --with-deps chromium
python3 -m playwright install chromium
Use the final python3 -m playwright install chromium in the same user context that will run the checkout command. If the container installs dependencies as root but OpenClaw executes as node, run that final install again as node so the browser cache exists under the runtime user's home directory.
Run the update script:
python3 scripts/setup_checkout_profile.py \
--output "$HOME/.clawdbot/credentials/real_card.json"
Before updating it, first check whether this file already contains the user's collected information. The generated profile JSON uses this shape:
{
"payment": {
"email": "buyer@example.com",
"card_number": "4242424242424242",
"exp": "12/34",
"cvc": "123",
"postal": "10001",
"country": "United States",
"name": "Cardholder Name"
},
"delivery": {
"name": "Test Buyer",
"first_name": "Test",
"last_name": "Buyer",
"address1": "123 Main St",
"address1_ascii": "123 Main St",
"address2": "Apt 2",
"city": "New York",
"city_ascii": "New York",
"state": "NY",
"state_ascii": "NY",
"postal": "10001",
"country": "United States",
"phone": "2125550100"
},
"billing": {
"same_as_delivery": false,
"name": "Billing Person",
"first_name": "Billing",
"last_name": "Person",
"address1": "456 Billing Ave",
"address1_ascii": "456 Billing Ave",
"address2": "Suite 5",
"city": "New York",
"city_ascii": "New York",
"state": "NY",
"state_ascii": "NY",
"postal": "10001",
"country": "United States",
"phone": "2125550101"
},
"additional_information": {
"resident_id_number": "540531196711167179"
}
}
additional_information.resident_id_number is optional. When the merchant requires it only for one checkout, you can also pass it at runtime with --resident-id-number or RESIDENT_ID_NUMBER.
If it does not, ask the user for the relevant information and then run the script above to update it.
For addresses in China, if the user does not separately provide an English or Latin version, the skill should first generate address1_ascii, city_ascii, and state_ascii automatically. If the postal code is missing, it should first fall back to a province-level generic postal code before continuing the checkout. Only if the page still rejects the address after automatic inference should the skill go back to the user and ask for more precise information.
If any of these are missing, ask the user directly in plain language: