---
title: "Renew a resource, refused before any charge above max_cost_usd"
method: POST
path: "/credits/resources/{resourceId}/renew"
tags: ["Resources"]
---

# Renew a resource, refused before any charge above max_cost_usd

`POST /credits/resources/{resourceId}/renew`

## Request

- Base URL: `https://api.paywithlocus.com/api`
- URL: `https://api.paywithlocus.com/api/credits/resources/{resourceId}/renew`
- Auth: one of:
  - HTTP bearer
  - HTTP bearer
  - HTTP bearer
  - HTTP bearer

Read the resource first and pass its renewal.price_usd as max_cost_usd. A higher price at renewal time is refused before any charge.

## Path parameters

- `resourceId` string, uuid, required

## Request body

- object
  - `idempotency_key` string, required
  - `max_cost_usd` string, required: Non-negative exact decimal string with at most six fractional digits. Endpoint-specific positivity and amount limits still apply.

## Response `200`

Renewed, with the updated row

## Other responses

- `202`: Still processing; the row is returned unchanged
- `404`: Not found or not yours
- `409`: charge_ceiling_exceeded: the live price exceeds max_cost_usd

---

[API](https://skmtc.dev/paywithlocus/apis/locus-pro-api.md) - [All operations](https://skmtc.dev/paywithlocus/apis/locus-pro-api/llms.txt) - [OpenAPI document](https://skmtc.dev/paywithlocus/apis/locus-pro-api/revisions/aab8fa5d6cef?raw)
