Agentic AI Course podcast

8. The First Paid Trial

0:00
NaN:NaN:NaN
Recuar 15 segundos
Avançar 15 segundos

A worked example of taking a first paid trial for the enquiry digest: checking and recording the Stripe payment, connecting the customer's Drive folder read-only, and adding a hook script that checks each run before the model writes. It ends by tracing the payout into the bank and separating cash received from revenue earned.

This episode is narrated by AI-generated synthetic voices.

Episode page & show notes

Visit website

Taking the first payment

The chapter's customer is invented: the heating engineer from the interview record, with made-up money, dates and enquiries. A pretend payment says nothing about real demand. It is used to show how the process works. The chapter only goes ahead because the owner made a written, dated change to the commitment rule after the answers were in. Without that change the digest is parked.

Before sending the $135 two-week trial request, the owner checks three things personally: the recipient, the amount, and the bank account the payouts go to. The engineer pays. Stripe shows the payment as Succeeded, with a gross of $135, a fee of about $4.22 and a net of about $130.78 for a domestic card. Claude Code adds the first row to the payments record. It confirms that gross minus fee equals net and leaves the payout cell blank. The chapter explains Stripe's chain of identifiers: payment intent, charge, balance transaction, payout. Onboarding uses a Google Drive folder the customer shares as Viewer. It is reached through the existing read-only MCP server, using a test account rather than a personal one. Digests go to a delivery folder in the project and are reviewed before they are sent.

A gate before the model runs

A script handles the steps that have one right answer: whether the folder can be read, how many files arrived that day, and whether the run is late. It runs as a UserPromptSubmit hook, because a hook that runs at session start cannot block the session. The script's exit code controls the outcome, as described in the Claude Code hooks reference. Exit 0 lets the run go ahead. Exit 2 stops it with a stated reason. If the run is late it still goes ahead, with a note that the late-day credit applies. Because the hook fires on every prompt in the folder, the script first reads the prompt from the JSON it receives and checks only the digest run. Its one dependency, Google's Python library for the Drive API, is installed with pip and listed in a requirements file.

The run's permissions are settled in advance and limited to Drive list and read plus writes to the delivery folder. The chapter separates three things: the model, Claude Code acting as the agent runtime, and the system of record, which is the payments file and a new customer file. The first invented Monday brings seven files and the digest passes all five criteria.

Tracing the cash

A new Stripe account holds its first payout for about one to two weeks. After that, card funds usually become available in two business days, as the payout schedules FAQ describes. The bank deposit shows only a lump sum. The itemized payout reconciliation report links each payout to its transactions, so Claude Code can fill in the payout identifier. Any mismatch is brought to the owner along with the evidence.

Cash received is kept separate from what has been earned: each of the ten digests earns a tenth of the fee. Three things remain open:

  • Desktop tasks skip their run when the laptop is asleep. Cloud scheduled tasks avoid this.
  • A failed run doesn't alert anyone.
  • The trial's end date is coming, and the owner needs to decide what to offer before it arrives.

Mais episódios de "Agentic AI Course"