2 min read

Welcome to the singularity: Buying a narration with link-cli

Stripe's CLI gives agents single-use shared payment tokens. PodRead now accepts them.
Welcome to the singularity: Buying a narration with link-cli

The hardest part of agent payments has been the wallet. Either your agent holds your credit card (yikes), or you set up a crypto wallet just to let it spend $2 (kind of annoying). Stripe's Link CLI sidesteps both of these frictions. (Disclosure: I work on Agentic Commerce at Stripe. This is combining my day job with my weekend side project.)

It's the digital equivalent of handing your agent a gift card before sending it to the store. The store charges the gift card, the gift card covers the exact amount, then it's spent. Your agent can't take the gift card to another store. Your real card never leaves your wallet.

Your agent asks your Link Wallet for a single-use token, called a shared payment token, bound to one merchant and one amount. You approve it with your fingerprint. The agent pays with the shared payment token, not your credit card.

PodRead now accepts these tokens alongside the Tempo stablecoin flow we shipped recently.

Link is Stripe's consumer facing wallet service. It is so prolific, you probably already use it without realizing.

Start by asking your agent to read the PodRead Link CLI docs, or just copy the docs as markdown.

If you don't already have the Link CLI installed, your agent will walk you through installing that first.

Next you'll have to authenticate. You will likely want to put the Link app on your phone (iphone, android). What's nice about Link for agents is that you authorize purchases using biometrics so nothing the agent buys is a surprise.

Once you are logged in to the CLI, your agent can mint a shared payment token against your saved credit cards. Each token is bound to one merchant and one amount. The merchant charges it like any other Stripe payment. The card details never touch the agent.

Here is the actual flow for buying a PodRead narration.

# Install link-cli
npm i -g @stripe/link-cli

# Authorize against your Link wallet (one-time)
link-cli auth login --client-name "my-agent"

# Find your card ids
link-cli payment-methods list

# Mint a single-use token for $2.50 bound to PodRead
# (network-id is PodRead's Stripe Profile, advertised in the 402 response)
link-cli spend-request create \
  --payment-method-id 'csmrpd*xxx' \
  --credential-type shared_payment_token \
  --network-id profile_61UbsYpl4SxclGNZQA6UbsYpSGSQ2OwdqYukbeHlQOwS \
  --amount 250 \
  --currency usd \
  --context "Buying a PodRead narration via link-cli." \
  --line-item "name:PodRead narration,unit_amount:250,quantity:1" \
  --total "type:total,display_text:Total,amount:250" \
  --request-approval

# Pay
link-cli mpp pay https://podread.app/api/v1/mpp/narrations \
  --spend-request-id lsrq_xxx \
  --method POST \
  --data '{"text":"hello world","voice":"callum","title":"babys first stripe-rail mpp narration"}' \
  --format json

The link-cli mpp pay command handles the back and forth of using the shared payment token to purchase a narration.

Under the hood, PodRead returns a 402 with the price and a stripe-method challenge. link-cli signs a credential bound to your spend request token. PodRead charges Stripe, returns a 201 with a nar_xxx id, and begins processing the text to speech job.

You bought a narration. Your agent never saw a credit card. And you didn't need to set up a crypto wallet.

Standard voice is $1.50 and premium is $2.50 via Stripe SPT. Using the Link CLI buys you the convenience of not running a crypto wallet for your one-off text to speech agentic needs.

You can find the full agent-friendly documentation at /docs/mpp/link-cli.

Welcome to the singularity.