Get everything needed to actually pay for a packet
prepare_fundingStep 2 for a buyer: returns the live payment requirements for funding a packet — the onchain door's own x402 challenge (accepts[], exact amount, asset, chain, pay-to address) read from that door at this moment, and, when a card rail is mounted on this host, its hosted checkout URL. To chip in a slice instead of the whole remaining amount, pass the typed contributeUsd input and it is forwarded to the real door verbatim; omit it to pay everything the packet still needs (the canonical remaining amount, never a stale posted wage, and never an implicit premium). The door remains the authority on floors, ceilings and the exact challenge — this tool never calculates a charge itself. You pay from YOUR own wallet or card; this server holds no funds and no keys, takes no payment, and marks nothing funded. A packet becomes funded only when a payment actually settles and is verified. Not ready to pay, or want to signal backing without money moving yet? prepare_backing is the FREE sibling door — a signed pledge, no payment required.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| workId | Yes | The packet id, from find_work. | |
| funderWallet | No | The 0x… address that will pay onchain. Needed for the onchain door's live challenge; the card path does not use it. | |
| contributeUsd | No | Optional EXPLICIT contribution in USD. Omit to fund the canonical remaining amount. Forwarded to the live door verbatim; the door enforces its own floor, ceiling and remaining-amount truth. An explicit amount above the remaining is a deliberate worker premium. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | No | ||
| tool | No | ||
| funded | No | ||
| payUsd | No | ||
| workId | No | ||
| claimId | No | ||
| claimable | No | ||
| next_call | No | ||
| proofRule | No | ||
| fulfillableBy | No | ||
| definitionOfDone | No | ||
| needs_from_caller | No | ||
| notClaimableReason | No |