---
title: "Top up credits using saved payment method"
method: POST
path: "/api/v1/billing/credits/topup"
---

# Top up credits using saved payment method

`POST /api/v1/billing/credits/topup`

## Request

- Base URL: `https://api.virga.dev`
- URL: `https://api.virga.dev/api/v1/billing/credits/topup`
- Auth: API key in header `X-API-Key`

Charges the saved payment method off-session via Stripe PaymentIntent and adds credits immediately. No checkout URL or browser redirect needed. Requires billing activated with a payment method on file.

## Request body

- CreditBundle
  - `bundle` '500' | '2000' | '10000', required: 500 credits = $5, 2000 credits = $18, 10000 credits = $75

## Response `200`

Credits added

- object
  - `message` string
  - `credits` number
  - `bundle` string
  - `paymentIntentId` string

## Other responses

- `400`: Invalid request parameters
- `401`: Missing or invalid API key
- `402`: Insufficient credits
- `403`: Account suspended, quarantined, or key revoked

---

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