---
title: "Buy extra credits"
method: POST
path: "/api/extra-credits/purchase"
tags: ["Billing"]
---

# Buy extra credits

`POST /api/extra-credits/purchase`

## Request

- Base URL: `https://api.xpoz.ai`
- URL: `https://api.xpoz.ai/api/extra-credits/purchase`
- Auth: HTTP bearer

Charge the saved payment method for extra credits.

## Request body

- object
  - `dollarsAmount` integer, required

## Response `200`

Charged, or requires client-side confirmation.

- union: Either the charge succeeded, or the card requires additional action (3DS) and the client must confirm the payment intent, then call the matching `/confirm` endpoint.
  - object
    - `charged` true, required
    - `newBalance` number, required
  - object
    - `charged` false, required
    - `requiresAction` true, required
    - `paymentIntentClientSecret` string, required

## Other responses

- `400`: Query or body validation failed. `message` joins all validation issues with `, `.
- `401`: Missing or invalid credentials.
- `402`: Card declined or payment rejected.
- `500`: Server error.

---

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