Complete purchase
complete_purchaseAfter paying with prepare_purchase.payment_plan, submit the mined transaction hash with the payment_id, purchase_ticket, and commerce_scope. Verifies the payment on-chain, then executes the purchased function and returns its result.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"job_id": "<job_id>",
"function_name": "<function_name>",
"buyer": "<buyer>",
"tx_hash": "<tx_hash>",
"payment_id": "<payment_id>",
"purchase_ticket": "<purchase_ticket>",
"commerce_scope": "<commerce_scope>"
},
"name": "complete_purchase"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| args | No | ||
| buyer | Yes | ||
| job_id | Yes | ||
| tx_hash | Yes | ||
| payment_id | Yes | ||
| function_name | Yes | ||
| commerce_scope | Yes | ||
| purchase_ticket | Yes |