ShowMeTheMoney Pro
Execute the protected ShowMeTheMoney premium action only after merchant-backend verification and StablePay payment succeed.
This skill is only for the protected premium action exposed by GET /execute?agent_did=<buyer_did>
Main workflow
When the user asks to use the premium ShowMeTheMoney capability:
- Resolve the current buyer DID from
stablepay_runtime_status. - Call the merchant backend premium endpoint:
GET http://127.0.0.1:8787/execute?agent_did=<buyer_did>
- Treat the merchant backend as the source of truth.
- If the backend returns
200, return the protected result. - If the backend returns
402 Payment Required:- Parse the x402 response from
accepts[0]:skill_did→ fromaccepts[0].extra.skillDidprice→ fromaccepts[0].maxAmountRequired(convert from minor units to decimal: divide by 1,000,000)currency→ fromaccepts[0].extra.currencyfacilitator_url→ fromaccepts[0].extra.facilitatorUrl
- NEVER use any hardcoded or fallback values
- call
stablepay_pay_via_gatewaywith the extracted values
- Parse the x402 response from
- If payment succeeds, retry the same
/executerequest once. - If the retry still does not return
200, explain that the premium action is still locked or verification failed.
Premium action contract
Use this request for the premium action:
- method:
GET - endpoint:
http://127.0.0.1:8787/execute - required query parameter:
agent_did
Optional query parameters may be used when helpful:
qprompt
These optional values are forwarded to the backend as request text for the premium action. The backend should:
- receive the premium request
- verify purchase state via StablePay
- return
402when the user has not purchased the skill - return
200only after verification succeeds - return a merchant-generated proof token in the premium result
Treat the backend response as the final authority.
Unlocked Store (Report Store)
After successful skill purchase, the backend returns unlocked_store in the 200 response. Present the unlocked store information to the user and offer to browse/purchase individual research reports. Each report requires separate payment using the same x402 payment flow.
Payment rules
When payment is required:
- Use
stablepay_pay_via_gateway. - Use the requirement returned by the backend when present.
- Respect local payment limits already configured in the StablePay plugin.
- Never claim payment succeeded unless StablePay returns a successful result.
- Retry the premium action only once after a successful payment.
