CHAPTER 2 of 11

Choose Your Recipient

Same primitive, now with a recipient selector. Each author or seller has their own wallet.

What changed from Chapter 1: The recipient is no longer fixed. The payment instruction's "To" field is now dynamic. That is the only change; the protocol is identical.
Devnet only: test tokens with no value. Get devnet SOL from the Solana faucet and devnet USDC from Circle's faucet.
// Chapter 1: one fixed recipient
const TO = gatewayPayTo;

// Chapter 2: the recipient the buyer chose
const TO = recipients[selected].address;

// Everything else is identical.
// Same transaction, same signing, same settlement.

Payment Complete

From—
To—
Amount—
NetworkSolana devnet
Time—
This selector has 2 recipients. It could have 2,000 or 200,000.
Each author publishes their wallet address. Payments route directly to them.