---
title: "Add credit with x402 or a Shared Payment Token"
method: POST
path: "/v1/credits/topup"
tags: ["Credits"]
---

# Add credit with x402 or a Shared Payment Token

`POST /v1/credits/topup`

## Request

- Base URL: `http://api.huebr.net`
- URL: `http://api.huebr.net/v1/credits/topup`
- Auth: none declared

Pays usd in USDC with one x402 payment and adds it to the caller's balance. With a body {"sharedPaymentToken": "spt_..."} it charges the agent's card through Stripe instead. Without an API key, creates an account and returns a new key holding the credit (shown once).

## Query parameters

- `usd` integer, required

## Request body

- TopUpBody
  - `sharedPaymentToken` string

## Response `200`

OK

---

[API](https://skmtc.dev/huebr/apis/huebr-api.md) · [All operations](https://skmtc.dev/huebr/apis/huebr-api/llms.txt) · [OpenAPI document](https://skmtc.dev/huebr/apis/huebr-api/revisions/8f304c9ca20d?raw)
