Buy a credit pack
Buys exactly what a quote showed. confirmed: true states that the person who pays said yes to that quote; pass their own words in user_confirmation. Every purchase records who confirmed it, when, through which key or connection, the amount and the quote. Buy with the same key or connection that asked for the quote; a quote from another one is refused with 409 quote_other_session. With pay_with: auto the saved card the owner allowed in the app is charged right away when the amount fits the owner's monthly limit and the workspace's limits; the credits are added at once and a receipt is emailed. Otherwise you get checkout_url, a payment page the person pays themselves; the credits arrive with that payment. The quote id makes this safe to retry: the same quote is never charged twice, and a repeat returns the first answer with replayed: true.
| Cost | What it does | Key scopes |
|---|---|---|
| The pack price, charged only after the person who pays confirmed the quote | Charges money | argorant:manage_lists |
Request
- Base URL: https://app.argorant.com
- URL: https://app.argorant.com/api/v1/credits/purchases
- Auth: HTTP bearer
Headers
Any unique text up to 128 characters. A retry with the same key and the same body within 24 hours returns the first answer (with the header Idempotent-Replayed: true) instead of doing the work twice. The same key with another body answers 409 idempotency_conflict.
Your own id for this request, 8 to 64 letters, digits, dot, dash or underscore. Returned as X-Request-Id; one is made for you when you send none.
Request body
Example request
{
"quote_id": "2f8a1b3c-4d5e-4f70-8192-a3b4c5d6e7f8",
"confirmed": true,
"user_confirmation": "Yes, buy the 5,000 credits for $69",
"price_shown_cents": 6900,
"tool_call_id": "toolu_01AbC"
}Response
Payment link or Paid with the saved card
Changes
No recorded changes to this operation across all 1 revision of this API.