---
title: "Start or resume a credit purchase"
method: POST
path: "/teams/{team_slug}/funding/purchases"
tags: ["Credits"]
---

# Start or resume a credit purchase

`POST /teams/{team_slug}/funding/purchases`

## Request

- Base URL: `https://api.presscart.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.presscart.com/teams/{team_slug}/funding/purchases`
- Auth: HTTP bearer

Creates a Stripe checkout session for the amount or the credit pack, or returns the open purchase of the same amount and pack with the terms it was created under. The team, the buyer and the total are decided by the server.

## Path parameters

- `team_slug` string, required

## Request body

- object
  - `amount` number, required: Amount to buy, in dollars
  - `profile_id` string, uuid, required
  - `pack_key` string: The credit pack to buy; the amount must equal its current price

## Response `200`

The open purchase of the same amount and pack was resumed

- object
  - `id` string, uuid, required
  - `amount` number, required
  - `status` 'OPEN' | 'PROCESSING' | 'SETTLED' | 'FAILED' | 'EXPIRED', required
  - `client_secret` string, required
  - `payment_expires_at` string, nullable, required
  - `match_preview` number, required
  - `processing_fee` number, required: The fee charged on top of the amount, in dollars
  - `total` number, required: What the customer pays, amount plus fee, in dollars
  - `pack` object, nullable, required: The pack terms the purchase was created under; null for a custom amount
    - `key` string, required
    - `name` string, required
    - `bonus_percent` integer, required
    - `bonus_amount` number, required: The bonus credits, in dollars
  - `offer` object, nullable, required: The match terms the purchase stores; null when it earns no match
    - `match_percent` integer, required
    - `cap` number, required: The largest match, in dollars
    - `promotional_expiry_days` integer, required

## Other responses

- `201`: Purchase created
- `400`: The body is malformed; the amount has more than two decimals or is outside the limits (code funding_amount_invalid, meta.min_amount and meta.max_amount); the pack is not available (code pack_unavailable); or the amount is not the current price of the pack (code pack_price_changed)
- `401`: Not signed in
- `403`: Buying is disabled (code funding_disabled), the caller is not a member, or the team does not exist
- `404`: The profile does not belong to the team, or the request carries no authorized team
- `409`: Another request is preparing a purchase (code purchase_in_progress, retry after one second), or this purchase was replaced (code purchase_superseded)
- `429`: Rate limit exceeded
- `500`: The stored funding settings are invalid (code funding_settings_invalid)
- `502`: Stripe could not create the session; the purchase is marked FAILED

---

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