Skip to main content
Buyer API refusals use the error shape below. The shared source-list route can return the Gateway v2 envelope with an errors array for a request without a key or with an invalid query. Failed runs return the run object with an embedded error and usage, so you can see what was charged. Read the run errors and usage together; a provider failure does not by itself mean the whole run was free.
code is stable and safe to branch on. message is written for a person reading a log. Extra fields depend on the code and are listed below.

Buyer API and shared directory codes

Did money move?

  • Authorization, validation and budget refusals before dispatch do not start a purchase. A failed run can arrive after a source was called; inspect its usage.
  • A failed run returns HTTP 502 with the run body: usage shows what was charged, and anything undelivered was refunded or is held until reconciled.
  • When in doubt, read the run. GET /v2/runs/ is free and authoritative.

Retrying