Collect a local test voucher
Continue the 100-wei deposit tutorial before stopping its fixture. You need its running GUI and attached test wallet, a nonzero channel and the customer's funded position. This exercise submits transactions on disposable chain 31337, not a public deployment.
1. Register the fixture customer as the permanent key
Connect customer, open its position and choose Vouchers. Register the customer's displayed address as the key. Wait for a successful receipt and reread the confirmed key. The offline signer below uses that fixed fixture customer; it cannot sign for a different registered key.
Registration is permanent even in this experiment. To start again with a different key, use a new position or a fresh disposable fixture—not an assumed reset.
2. Prepare the exact invoice commitment
Construct a synthetic invoice for this chain, payment address, owner, channel and desired cumulative total. Use the agreed invoice codec and helper to obtain its 32-byte hash. Do not hash a URL or arbitrary JSON formatting. The on-chain contract treats the hash as opaque; it does not validate the invoice for you.
3. Sign locally, then compare the signing details
In another terminal from the source checkout, replace every placeholder with the actual fixture values. Use the payment address from the loaded signing domain/binding, not the CAM host:
make pay-to-play/local/voucher/sign \
DOCKER_CONTEXT=your-local-context \
PAY_TO_PLAY_ADDRESS=0x... \
PAY_TO_PLAY_CHANNEL_ID=... \
PAY_TO_PLAY_TOTAL=100 \
PAY_TO_PLAY_INVOICE_HASH=0x...The total is a lifetime cumulative amount in wei. The hash must be exactly 32 bytes. This offline helper neither registers the key nor validates the invoice or backing. Keep signature output out of commits and shared logs.
Enter the same total and hash in Vouchers and inspect signing details. Compare PayToPlay/2, chain 31337, payment address and digest with the helper output. Back returns to the voucher task and compatible drafts. A matching digest is still not a collection receipt.
4. Collect using the actual configured collector
The prerequisite tutorial chose admin as both payee and collector. Switch to that account, wait for the refresh, and keep the customer's owner/channel selected. Account changes clear account-bound drafts; re-enter the total, hash, signature and a 100-wei collection cap before review.
Review Collect voucher payment, send and confirm in the browser. Check the actual VoucherCollected amount, payee, cumulative paid total and invoice hash. With the original 100-wei backing and no prior payments, collection should pay 100 and leave zero balance. Gas is separate. A zero-payment replay can succeed without a collection event.
The role selector's label does not grant collection permission. For a differently configured channel, use its real collector; zero pauses collection.
Finish the exercise
Detach the wallet and stop the owned demo. For the service responsibilities that this experiment does not implement—durable acceptance, allocation, delivery and uncertain outcomes—read the integration guide. Automated coverage is in app checks.