---
title: "Buy credit for your own balance with your saved card [write]"
method: POST
path: "/billing/topups"
---

# Buy credit for your own balance with your saved card \[write\]

`POST /billing/topups`

## Request

- Base URL: `https://api.agentsky.dev/v1`
- URL: `https://api.agentsky.dev/v1/billing/topups`
- Auth: none declared

Charges the caller's saved card the credit plus the card processing fee and adds the credit to their balance. amount is 1000, 2000, 5000 or 10000 cents. request_id makes a repeat of the same request charge once (200 instead of 201). Auto top-up is not changed. 409 card_required without a saved card (POST /billing/card-setup adds one), 402 card_declined, 503 payments_unavailable where card payments are not set up. A workspace key or a restricted credential cannot buy credit.

## Request body

- object
  - `amount` object, required
    - `amount` string, required: Whole US cents
    - `currency` 'USD', required
  - `request_id` string, required

## Response `201`

Bought

- object
  - `charged` boolean
  - `balance` object
    - `amount` string, required: Whole US cents
    - `currency` 'USD', required

## Other responses

- `default`: Error — { error: { code, message, request_id } }

## Changes

- **2026-11-02** `e5e8f0229a99`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/agentsky/apis/agentsky-developer-api/changes/billing/topups/post.md)

---

[API](https://skmtc.dev/agentsky/apis/agentsky-developer-api.md) - [All operations](https://skmtc.dev/agentsky/apis/agentsky-developer-api/llms.txt) - [OpenAPI document](https://skmtc.dev/agentsky/apis/agentsky-developer-api/revisions/0d435187cd55?raw)
