putty
API ReferenceLedger

Read one payment order

Returns a payment order and its state. `pending` means the user has not paid (or the payment has not confirmed yet); `confirmed` means the account has been credited and the order is terminal. A client polls this after the user signs. An order belonging to another user answers the same 404 as one that does not exist.

GET
/billing/orders/{id}

Returns a payment order and its state. pending means the user has not paid (or the payment has not confirmed yet); confirmed means the account has been credited and the order is terminal.

A client polls this after the user signs. An order belonging to another user answers the same 404 as one that does not exist.

Path Parameters

id*string

The order's id, as returned by POST /billing/orders. This is the order row's own id, not the on-chain orderId the receiver's Paid event carries — that one is on the response body for a client that needs to correlate against the chain.

Length1 <= length

Response Body

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/billing/orders/string"
{  "order": {    "id": "string",    "pack": "string",    "quoteUsd": "string",    "token": "string",    "amount": "string",    "orderId": "string",    "status": "pending",    "credits": 0,    "txHash": "string",    "tx": {      "id": "string",      "chainSlug": "string",      "chainId": 0,      "to": "string",      "data": "string",      "value": "string",      "summary": [        "string"      ],      "expiresAt": "2019-08-24T14:15:22Z"    },    "createdAt": "2019-08-24T14:15:22Z"  }}

Quote a credit pack at the server's token price POST

Quotes a credit pack in a token and returns the amount to send, priced from a **Chainlink Data Feed on Robinhood Chain read at request time** — the price is never taken from the request and never assumed. `usdg` is priced through the `USDG / USD` feed and `eth` through `ETH / USD`. The response carries `priceSource`: the aggregator proxy, the exact round id, and when that round was published, so a client can call `latestRoundData()` on the same address and confirm the rate it was given. `roundId` is a string because it is an 80-bit counter that does not fit a JSON number. A round older than **twice the feed's own heartbeat** is refused rather than quoted. Every feed on this chain reports once a day, which is correct for a stablecoin whose price does not move intraday, so a shorter bound would refuse a healthy feed. Two heartbeats tolerates one missed update and no more. **`tokenPriceUsd` in the request is ignored.** The rate is the server's; a caller that names one does not get it. The field is still accepted so an older client is not broken by the change. This is the pricing half of the order. Creating the payment order and the unsigned transaction to sign needs a deployed payment receiver contract, and there is not one yet — so the response is a quote, and the 201 order response is not yet returned by this route. Card checkout through the Business Kit is a separate flow and is unaffected.

Estimate what a build run will cost and what it is capped at GET

The estimate the Build composer shows next to the prompt: what this prompt text and this project's current size are expected to cost, and the hard cap the run will stop at. The run is metered as it goes and charges step by step, so this is an estimate and the cap is a promise — the run checkpoints and ends with `budget.exhausted` rather than billing past the cap. `affordable: false` is the early warning that precedes the 402.