/v1/tools/add_creditfreeAdd credit
A Stripe page that adds credit to pay as you go, as Account's Add credit does: $20, $50, $100, or any whole amount from $5 to $500. Credit never expires; on a plan, a top-up buys more work at the plan's rate. owed true instead pays what this workspace owes after a refund (plan_status says it), which pauses it until paid: the page is for that amount (at least $0.50, any more staying as credit), and paying lifts the pause. Given the draft they were about to run, the flow, or their Chat conversation, Stripe brings them back to it once they have paid, ready to run; paying runs nothing. The credit lands when it is paid there. Free to ask.
Fields
| Field | Type | Default | What it is |
|---|---|---|---|
usd | integer | None | How much, in US dollars; left out with owed true |
owed | boolean | None | true pays what this workspace owes after a refund, in place of usd |
draft | string | None | The person's draft they were about to run, draft_… from list_drafts: Stripe brings them back to it once they have paid |
flow | string | None | The flow they were about to run, flow_… from list_flows: Stripe brings them back to it once they have paid |
chat | string | None | The person's Chat conversation they were in, by its id: Stripe brings them back to it once they have paid |
Call it
Request
curl -X POST https://app.scrub.app/v1/tools/add_credit \
-H "Authorization: Bearer $SCRUB_KEY" \
-H "Content-Type: application/json" \
-d '{}'Answer
{
"ok": true,
"result": {
"…": "…"
}
}What result holds is said above.
Every call can also answer an error: what comes back. Try it with your key from Account.