Skip to content

Stripe

Your agents put a checkout on every offer, take a pilot’s first payment and refund when asked; each payment credits the Play that earned it.

Connect
Nothing to connect, 1 grant
Runs through
Your account
First run
Put a checkout on your pilot offer, free on your account
Sites
None, it holds your records
Offer.publish
You, to your agent

Put a checkout link on my 90-day pilot at $99 a month, and show me the page.

curl -X POST "https://api.sb/leaseline.app/offers/publish?mode=try" \
  -H "Authorization: Bearer $SB_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"offer":"offers/pilot-90-day","checkout":"link"}'
npx startup-builder do Offer.publish --try --data '{"offer":"offers/pilot-90-day","checkout":"link"}'
{
  "name": "do",
  "arguments": {
    "mode": "try",
    "code": "return await $.Offer.publish({ offer: 'offers/pilot-90-day', checkout: 'link' })"
  }
}
import { $ } from 'startup-builder'

const result = await $.try.Offer.publish({ offer: 'offers/pilot-90-day', checkout: 'link' })
Response
{
  "$type": "Offer",
  "mode": "try",
  "stored": false,
  "offer": "offers/pilot-90-day",
  "price": {
    "amount": 99,
    "currency": "USD",
    "per": "month",
    "for": "3 months"
  },
  "checkout": "https://pay.leaseline.app/b/pilot-90-day",
  "onPaid": "Order.paid credits the Play that started the Deal"
}
Try mode reads, stores nothing and spends nothingAPI referenceIts Nouns

Connect once

  1. Nothing to connect: your startup’s own Stripe connected account opens with your first paid offer (hub Stripe).
  2. To bring an existing Stripe account’s customers and history in, call Integration.connect with system: 'billing'; it imports read-only.
GrantWhat it unlocksScope
Read your existing accountCustomers, Subscriptions and charges imported once, read-onlyread_only
ToDo this
PauseIntegration.pause stops new checkouts at once; payments already made settle as usual.
ReconnectIntegration.reconnect re-approves an imported account in place, keeping its cursor, so no charge imports twice.
DisconnectIntegration.revoke ends the import of an existing account; your startup’s own connected account stays, because your customers pay through it.

What your agents do

AskVerbRuns throughPrice
Put a checkout link on the 90-day pilot.Offer.publishYour accountFree
Take Northgate’s first payment for the pilot.Order.payYour accountFree
Add Northgate’s second portfolio to their subscription.Subscription.resizeYour accountFree
Refund the second month to Cedar Hollow, with the reason.Order.refundYour accountFree
Show me this month’s payouts and fees.Transaction.listYour accountFree

Calls on your own account are free.

What it holds

NounThe account’s objectWhenWhich side leads
CustomercustomerA buyer pays for the first timeYour records
OfferproductYou publish an offerYour records
PricepriceYou publish an offerYour records
InvoiceinvoiceA Subscription billsThe account
SubscriptionsubscriptionA buyer subscribesThe account
Transactionbalance transactionMoney movesThe account
DisputedisputeA buyer disputes a chargeThe account

Events and webhooks

DirectionEvent
EmitsOffer.published, Order.paid, Order.refunded, Subscription.resized
Hears checkout.session.completedBecomes Order.paid
Hears invoice.paidBecomes Subscription.renewed
Hears charge.dispute.createdBecomes Order.disputed
Hears charge.refundedBecomes Order.refunded

Any Event can wake a Workflow, and a Watch delivers it to your endpoint, signed (Events and webhooks).

Limits

WhatLimitCall
An imported accountReads only: new checkouts always run on your startup’s own connected accountEvery call
RefundsUp to what the Order paid, with the reason; each one posts its reversing EntriesOrder.refund
DisputesStripe sets a deadline on each; your agent drafts the evidence from the Order’s records the day it opensEvery call

What try does here

Returns the checkout, the amount and the Entries it would post; nothing is charged. A sk_test_ key runs the same calls against your Stripe test account.

How long a connection lasts

A connection lasts for as long as your startup runs: the connected account carries no sign-in that runs out, and an imported account lasts until you revoke it.

The platform asks you to reconnect 7 days before it runs out; until you do, a call that needs it refuses with needs-reauth.

Plays and strategies

Used by

No Workflow, agent task or Service acts through it yet: your agents call it directly.

Reference

5 calls, each with its path and price
CallPathPrice
Offer.publishPOST /offers/publishFree
Order.payPOST /orders/payFree
Subscription.resizePOST /subscriptions/resizeFree
Order.refundPOST /orders/refundFree
Transaction.listGET /transactions/listFree

Contents