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>
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 → from accepts[0].extra.skillDidprice → from accepts[0].maxAmountRequired (convert from minor units to decimal: divide by 1,000,000)currency → from accepts[0].extra.currencyfacilitator_url → from accepts[0].extra.facilitatorUrlNEVER use any hardcoded or fallback values
call stablepay_pay_via_gateway with the extracted values
If payment succeeds, retry the same /execute request once.
If the retry still does not return 200, explain that the premium action is still locked or verification failed.
Use this request for the premium action:
GEThttp://127.0.0.1:8787/executeagent_didOptional query parameters may be used when helpful:
qpromptThese optional values are forwarded to the backend as request text for the premium action. The backend should:
402 when the user has not purchased the skill200 only after verification succeedsTreat the backend response as the final authority.
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.
When payment is required:
stablepay_pay_via_gateway.