Tasks
Tasks
Payments

Declare the payment channel that funds this task

The payer declares the pay.sh MPP channel it already opened for this task. pay.sh strips payment headers before proxying, so this is how EM learns the channel id. The payee is resolved server-side from the assigned worker — a payee named in the body is only ever checked.

post/api/v1/tasks/{task_id}/channel

Request

  • Base URL: https://api.execution.market
  • URL: https://api.execution.market/api/v1/tasks/{task_id}/channel
  • Auth: API key in header Signature-Input

Path parameters

task_idstring required

UUID of the task

Request body

channel_idstring required

Channel id assigned by pay.sh (base58 Solana pubkey)

payerstring nullable

Base58 account that OPENED the channel on Solana. Optional, and only ever CHECKED: EM reads the channel account on chain and uses the payer it finds there. Naming a different one is a 400 (DECLARED_PAYER_DISAGREES). It does NOT sign the vouchers — that is the channel's authorizedSigner, an ephemeral per-session key that is also a seed of the channel address, and on the live mainnet channel it is a DIFFERENT account from the payer. This description used to say 'and signs its vouchers', which described an object that does not exist and would send a careful client to put the session key here.

payeestring nullable

Optional. Checked against the worker resolved from the task; a mismatch is rejected. The caller cannot choose where money goes.

cap_usdcnumber nullable

Cap the payer deposited when opening the channel, in USDC. No maximum by default; a ceiling configured for the platform or for your wallet applies (422 CHANNEL_CAP_OUT_OF_RANGE).

work_unitstring nullable

Unit of work this channel meters: observation | second | scan | token | byte | request | item

price_per_unit_uusdcinteger nullable

Price of one work unit in micro-USDC (1 USDC = 1_000_000)

session_idstring nullable

pay.sh session id for this channel, if the payer knows it

open_txstring nullable

Base58 signature of the transaction that OPENED the channel. Published as-is on the public panel and linked to the explorer.

distribution_hashstring nullable

Hex commitment of the split distribution the channel opened with (it enters the PDA derivation, so it identifies the split set). Optional and never the source: EM stores the one it reads from the channel account on-chain. A value that disagrees is logged and ignored — the chain wins.

Response

Channel bound to the task

successboolean

Whether the operation succeeded

messagestring required

Human-readable result message

dataobject nullable

Additional response data

Changes

No recorded changes to this operation across all 1 revision of this API.