# Take a payment

URL: /systems/finance/take-a-payment · Id: `guide:take-a-payment`

> Say "take a $29 payment" and get checkout on your domain, an Order and receipt per buyer, sales tax and every payment in your books.

Take a one-time payment for an [Offer](/business/nouns/offer) at a fixed [Price](/business/nouns/price): each buyer pays at checkout on your domain, and Stripe collects it.

Needs: [Startup](/business/nouns/startup)

**Before real money moves**

- Who says yes: You. Your agent shows you the run and waits for your [Approval](/business/nouns/approval).
- You leave the chat: Once, at Stripe: to confirm who you are and add the bank account payouts land in.
- First question at Idea: “The full price now, or a refundable deposit until it ships?”
- First question at Live: “One price for everyone, or one per plan?”
- What it costs: The card fee on each payment.
- To undo it: Withdraw the Offer, and refund any payment from its Order.

## What you get
- 1 Offer at a one-time $29 Price (Offer)
- 1 product and price on Stripe (Price)
- 1 checkout page on your domain, card and wallets (Offer)
- 1 Order for each buyer, placed and paid (Order)
- 1 card or wallet payment for each Order (Transaction)
- 1 receipt emailed from your domain (Message)
- 1 sales tax on every charge (Order)
- 2 lines in your books per charge: cash in and revenue earned (Entry)

## Your agent does
**For agents**

- Guide: `guide:take-a-payment`, status `live`. Page: [/systems/finance/take-a-payment.md](/systems/finance/take-a-payment.md).
- Approval: ask the founder first. Show the run, then wait for their Approval; a refusal ends it.
- Leaves the chat: Once, at Stripe: to confirm who you are and add the bank account payouts land in.
- Needs first: [Startup](/business/nouns/startup).
- Run: call the steps in order, each through the API, SDK, CLI or MCP tab below; a later step passes the `$id` an earlier one returns. Each value marked example is the sample business’s: pass the founder’s own.

| Step | Verb | Inputs (type, required, this guide’s value) | Returns |
| --- | --- | --- | --- |
| 1 | [`Offer.create`](/business/nouns/offer/create) (`verb:Offer.create`) | `price` money, required: example `{"amount":29,"currency":"USD"}`; `terms` text: example `"One-time setup fee, refundable within 14 days."`; `interval` string: example `"once"` | `offer` Offer |
| 2 | [`Offer.publish`](/business/nouns/offer/publish) (`verb:Offer.publish`) | `offer` Offer (an id), required: the `$id` step 1 returns | `offer` Offer |

Returns: the last call answers with `offer` and its `action`, whose `status` is `done`, `pending` (waiting on an Approval or a Worker), `failed`, `canceled` or `refused`:

```json
{
  "api": "https://api.sb/leaseline.app",
  "offer": {
    "$id": "https://api.sb/leaseline.app/offers/offer_1",
    "$type": "Offer",
    "price": {
      "amount": 29,
      "currency": "USD"
    },
    "interval": "once",
    "terms": "One-time setup fee, refundable within 14 days."
  },
  "action": {
    "$id": "https://api.sb/leaseline.app/actions/action_1",
    "operation": "Offer.publish",
    "status": "done"
  },
  "links": {
    "self": "https://api.sb/leaseline.app/actions/action_1"
  }
}
```

Next: offer [Answer a dispute](/systems/finance/answer-a-dispute) (`guide:answer-a-dispute`) when `Dispute.opened` fires, or “Make it $49 for new buyers”, or “Refund the last payment”.

Calls: `Offer.create` → `Offer.publish`

Ask:

```text
Take a $29 payment for setup.
Send me a link a customer can pay $29 with.
Charge $29 once for onboarding.
```

API:

```bash
# 1. Offer.create
OFFER=$(curl -X POST https://api.sb/leaseline.app/offers \
  -H "Authorization: Bearer $STARTUP_BUILDER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"price":{"amount":29,"currency":"USD"},"interval":"once","terms":"One-time setup fee, refundable within 14 days."}' | jq -r '.offer["$id"] | split("/") | last')

# 2. Offer.publish
curl -X POST https://api.sb/leaseline.app/offers/$OFFER/publish \
  -H "Authorization: Bearer $STARTUP_BUILDER_API_KEY"
```

SDK:

```ts
import { $ } from 'startup-builder'

const offer = await $.Offer.create({ price: { amount: 29, currency: 'USD' }, interval: 'once', terms: 'One-time setup fee, refundable within 14 days.' })
await $.Offer.publish({ offer: offer.$id })
```

CLI:

```bash
OFFER=$(npx startup-builder do Offer.create --json '{"price":{"amount":29,"currency":"USD"},"interval":"once","terms":"One-time setup fee, refundable within 14 days."}' | jq -r '.offer["$id"] | split("/") | last')
npx startup-builder do Offer.publish --json '{"offer":"'"$OFFER"'"}'
```

MCP:

```json
{
  "name": "do",
  "arguments": {
    "code": "const offer = await $.Offer.create({ price: { amount: 29, currency: 'USD' }, interval: 'once', terms: 'One-time setup fee, refundable within 14 days.' })\nreturn await $.Offer.publish({ offer: offer.$id })"
  }
}
```

## Change it
- Make it $49 for new buyers.
- Refund the last payment.
- Ask buyers for a company name at checkout.
- Make it a refundable deposit instead.

## Under the hood
- Systems: [Billing](/systems/billing), [Ledger](/systems/ledger), [Tax](/systems/tax)
- Nouns: [Offer](/business/nouns/offer), [Price](/business/nouns/price), [Order](/business/nouns/order), [Entry](/business/nouns/entry)
- Events: `Offer.created`, [`Offer.published`](/business/events/Offer.published), [`Order.placed`](/business/events/Order.placed), [`Order.paid`](/business/events/Order.paid)
- Stripe objects: `Product`, `Price`, `Checkout Session`, `PaymentIntent`, `Charge`, `Tax Calculation`

Each buyer's checkout places an [Order](/business/nouns/order), and [`Order.pay`](/business/nouns/order/pay) settles it on the [Startup](/business/nouns/startup)'s own Stripe account. The charge lands in the payments balance, pending until it settles, then pays out to your bank.