Cart

Pay for your cart

Pays every line (or the items given, by line id; the others stay in the cart) in one go — the same rules as POST /api/v1/orders/batch: all checked first at today’s price, none placed if any cannot go, then each placed on its own. The lines placed leave the cart; one that failed at the last moment stays, with its reason. Send an Idempotency-Key per attempt (a retry with it is that same attempt) and max_total, the total you showed. dry_run: true checks only and also returns the cart; when your balance holds only part of it, the answer’s fit names the lines it pays for now — send those as items, with max_total = fit.total, under the same key.

post/api/v1/cart/checkout

Request

  • Base URL: https://spoofy.social
  • URL: https://spoofy.social/api/v1/cart/checkout
  • Auth: one of:
    • HTTP bearer
    • API key in cookie better-auth.session_token

Headers

Idempotency-Keystring

Any unique string (≤ 120 chars) per intended order. Retrying with the same key returns the first order instead of charging twice.

Request body

dry_runboolean
max_totalstring
itemsstring[]

Only these lines (ids); default the whole cart.

Response

A dry run (with the cart) — or a replay of an earlier attempt with the same Idempotency-Key.

dry_rununknown
okboolean

Every order can go, nothing stops the batch, and your balance holds it.

totalstring

Today’s price of all of it. USD as a decimal string.

needsstring

What your balance must hold now. USD as a decimal string.

balancestring

Your balance. USD as a decimal string.

sufficientboolean
shortfallstring

What to top up first (0.00 when nothing). USD as a decimal string.

Changes

No recorded changes to this operation across all 1 revision of this API.