record_payment
Record a payment receipt after on-chain or x402 settlement, marking a need as funded when still open. Stores receipt and updates need status without verifying the transaction hash.
Instructions
Record a payment receipt after on-chain or x402 settlement. Writes a payment Receipt and, if the Need is still open, flips status to funded. Does not verify the tx_hash on-chain in this version — treat as attested by from_entity. Side effects: receipts.json + needs.json. Not a substitute for complete_need.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| amount | No | Amount string. Defaults to the Need target. | |
| need_id | Yes | Need id that received the payment. | |
| tx_hash | Yes | Transaction hash or x402 settlement id. Not verified on-chain. | |
| from_entity | Yes | Payer id attested on the receipt. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |