---
title: "Buy credit for the caller"
method: POST
path: "/api/v1/me/billing/purchases"
tags: ["Me"]
---

# Buy credit for the caller

`POST /api/v1/me/billing/purchases`

## Request

- Base URL: `https://entire.io` (the document declares no server; this is the origin it was published from)
- URL: `https://entire.io/api/v1/me/billing/purchases`
- Auth: none declared. Required headers: `Idempotency-Key`

Charges the saved card. Without one, set up billing first.

## Headers

- `Idempotency-Key` string, required

## Request body

- object
  - `amount_cents` integer, required

## Response `202`

The purchase was accepted and the saved card is being charged.

- object
  - `id` string, required: The purchase id. Poll the purchase by it.
  - `status` 'pending' | 'paid' | 'failed' | 'expired', required: pending until charged; then paid, failed, or expired.
  - `amount_cents` integer, required
  - `charge_id` string: Matches the charges list id once settled.

## Other responses

- `400`: Invalid request
- `401`: Not authenticated
- `403`: Access denied
- `404`: Resource not found
- `409`: Resource conflict
- `412`: Precondition failed
- `422`: Validation failed
- `429`: Too many requests
- `502`: Entire Core request failed
- `503`: Entire Core is unavailable. Type "billing-not-configured" means billing is not configured.

## Changes

- **2026-10-23** `6ddd3604fc38`: 3 info
  - added the optional property `charge_id` to the response with the `202` status
  - added the required property `id` to the response with the `202` status
  - added the required property `status` to the response with the `202` status
- **2026-10-19** `c773deee1ce1`: 3 warning
  - removed the request property `cancel_url`
  - removed the request property `success_url`
  - removed the optional property `checkout_url` from the response with the `202` status
- **2026-10-18** `25c28682a28e`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/entire/apis/entire-api/changes/api/v1/me/billing/purchases/post.md)

---

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