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
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' })
{
"$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"
}
Connect once
- Nothing to connect: your startup’s own Stripe connected account opens with your first paid offer (hub Stripe).
- To bring an existing Stripe account’s customers and history in, call
Integration.connectwithsystem:; it imports read-only.'billing'
| Grant | What it unlocks | Scope |
|---|---|---|
| Read your existing account | Customers, Subscriptions and charges imported once, read-only | read_only |
| To | Do this |
|---|---|
| Pause | Integration.pause stops new checkouts at once; payments already made settle as usual. |
| Reconnect | Integration.reconnect re-approves an imported account in place, keeping its cursor, so no charge imports twice. |
| Disconnect | Integration.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
| Ask | Verb | Runs through | Price |
|---|---|---|---|
| Put a checkout link on the 90-day pilot. | Offer.publish | Your account | Free |
| Take Northgate’s first payment for the pilot. | Order.pay | Your account | Free |
| Add Northgate’s second portfolio to their subscription. | Subscription.resize | Your account | Free |
| Refund the second month to Cedar Hollow, with the reason. | Order.refund | Your account | Free |
| Show me this month’s payouts and fees. | Transaction.list | Your account | Free |
Calls on your own account are free.
What it holds
| Noun | The account’s object | When | Which side leads |
|---|---|---|---|
| Customer | customer | A buyer pays for the first time | Your records |
| Offer | product | You publish an offer | Your records |
| Price | price | You publish an offer | Your records |
| Invoice | invoice | A Subscription bills | The account |
| Subscription | subscription | A buyer subscribes | The account |
| Transaction | balance transaction | Money moves | The account |
| Dispute | dispute | A buyer disputes a charge | The account |
Events and webhooks
| Direction | Event |
|---|---|
| Emits | Offer.published, Order.paid, Order.refunded, Subscription.resized |
Hears checkout.session.completed | Becomes Order.paid |
Hears invoice.paid | Becomes Subscription.renewed |
Hears charge.dispute.created | Becomes Order.disputed |
Hears charge.refunded | Becomes Order.refunded |
Any Event can wake a Workflow, and a Watch delivers it to your endpoint, signed (Events and webhooks).
Limits
| What | Limit | Call |
|---|---|---|
| An imported account | Reads only: new checkouts always run on your startup’s own connected account | Every call |
| Refunds | Up to what the Order paid, with the reason; each one posts its reversing Entries | Order.refund |
| Disputes | Stripe sets a deadline on each; your agent drafts the evidence from the Order’s records the day it opens | Every 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
| Kind | Where |
|---|---|
| Plays | Paid pilot, Annual prepay, Risk-reversal offers, Usage upsell |
| Strategies | Hands-on, Paid, Launch and search |
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
| Call | Path | Price |
|---|---|---|
Offer.publish | POST / | Free |
Order.pay | POST / | Free |
Subscription.resize | POST / | Free |
Order.refund | POST / | Free |
Transaction.list | GET / | Free |