---
title: "Buy query budget for an agent credential"
description: ""
canonical: "https://pgbeam.com/docs/api/payments/createBudgetTopup"
last-updated: "2026-09-07T21:43:42.000Z"
---

# Buy query budget for an agent credential

> 

URL: https://pgbeam.com/docs/api/payments/createBudgetTopup

Buys additional queries for the agent credential this request is
authenticated as, using the Machine Payments Protocol (HTTP 402 with the
`Payment` authentication scheme).

Authenticate with the credential's hosted MCP token (`pba_...`) as a
bearer token. The credential identifies itself, so no human and no
dashboard session is involved.

Without a payment credential the response is `402` carrying a complete
`WWW-Authenticate: Payment` challenge. Fulfil it, then repeat the request
with the credential in the `Payment-Authorization` header (the challenge
selects that field so the bearer token can stay in `Authorization`). On
success the queries are granted, streamed to the data planes, and the
response carries a `Payment-Receipt` header.

Purchased queries do not raise the credential's policy budget. They are a
separate pool the proxy spends only once the policy's hourly and daily
windows have refused a statement, and they expire.
