API
payment_required
HTTP 402. Payment required
What it means
The content is paid and you have no entitlement.
What to do
order_hint is a ready-to-send create_order request for exactly what is missing. Create the order, pay it, then retry. Nothing in the SDKs or the CLI buys on its own. See the quickstart.
Retrying
Do not retry the same request. Change it first.
Extra members
order_hint: Thereason(item_not_purchased,order_not_funded,order_refunded), the total, the items and a ready-to-sendcreate_orderrequest.
Example
{
"type": "https://reuseforge.com/docs/api/errors/payment_required",
"title": "Payment required",
"status": 402,
"detail": "This version contains paid files. Create the order in order_hint, pay it, then retry.",
"instance": "/api/v1/items/acme/invoice-extractor",
"code": "payment_required",
"request_id": "req_c4v8n2m6x1z3",
"order_hint": {
"reason": "item_not_purchased",
"total_cents": 1500,
"currency": "USD",
"items": [
{
"item": "acme/premium-ocr",
"item_id": "itm_premiumocr22",
"version": "2.0.1",
"price_cents": 1500
}
],
"order_id": null,
"create_order": {
"method": "POST",
"href": "/api/v1/orders",
"body": {
"items": [
{
"item": "acme/premium-ocr",
"version": "2.0.1"
}
],
"rail": "simulated"
}
}
}
}Every error is application/problem+json (RFC 9457). Branch on code, show detail to people and quote request_id when you ask for help. See the error catalogue.