Rulesnorthwind-deprecated-endpoint

northwind-deprecated-endpoint

warning

northwind/correctness/deprecated-endpoint

Docs page ↗

Agents write charges.create() because that is what most of the examples on the internet still show — it was the documented call for six years and only moved to payments.create() last spring.

22

codebases affected, of 58

38%

of everything we scanned

no docs fix scored yet

0

docs commits aimed at this

Where it’s failing

northwind.charges.* is deprecated. Use northwind.payments.* instead.

what we find

what we change it to

await northwind.charges.create({
amount: 2400,
currency: 'usd',
source: token,
}) // charges.* is deprecated
await northwind.payments.create({
amount: 2400,
currency: 'usd',
payment_method: token,
})

Replace charges.create() with payments.create(). The argument shape is unchanged except that `source` is now `payment_method`.

Metadata

Category
correctness
Type
suggestion
Severity
warning
Recommended
yes
Languages
javascriptpython

Live telemetry

22 / 58 scans

Fired in 38% of scanned codebases.

After every docs commit

No docs commits target this rule yet. When one merges, the next weeks of scans re-score it here.

A fix for your docs page

Wherever this rule fires, a page on your docs site taught it. api-doctor writes the edit and opens it as a pull request on your docs repo — you review and merge.

No fix yet

Draft a docs fix for this rule

api-doctor writes the docs change from the fire pattern — you review it