Skip to content

API reference

Billing API

Balance and transaction history

Beta

Base URL
https://reelmirror.com/api
Authentication
Authorization: Bearer rm_…
Contract
openapi.json

Get balance

GET/v1/billing/balance

Bearer token

Response 200

Current balance and auto-reload settings Fields below are inside data.

  • balance_centsinteger
  • balance_dollarsstring
  • auto_reloadboolean
  • reload_threshold_centsinteger | null
  • reload_amount_centsinteger | null
curl "https://reelmirror.com/api/v1/billing/balance" \
  -H "Authorization: Bearer $REELMIRROR_API_KEY"
Response 200 (example)
{
  "data": {
    "balance_cents": 1,
    "balance_dollars": "string",
    "auto_reload": true,
    "reload_threshold_cents": 1,
    "reload_amount_cents": 1
  }
}

Update auto-reload settings

PATCH/v1/billing/balance

Scope billing:write

Configure auto-reload settings. Requires billing:write scope.

If auto_reload: true is requested and no payment method is saved, a Stripe Checkout setup session is returned (setup_url) so the user can add a card — auto_reload is not saved as true in this case.

Request body application/json

  • auto_reloadboolean

    Enable or disable automatic balance reload

  • reload_threshold_centsinteger0–5000

    Balance level (in cents) that triggers an auto-reload. Min 0, max 5000.

  • reload_amount_centsinteger100–5000

    Amount (in cents) to reload when the threshold is hit. Min 100 ($1), max 5000 ($50).

Response 200

Updated balance settings, or a Stripe setup URL when no payment method is on file

One of 2 shapes:

Option 1
  • dataobject
    5 child attributes
    • balance_centsinteger
    • balance_dollarsstring
    • auto_reloadboolean
    • reload_threshold_centsinteger | null
    • reload_amount_centsinteger | null
Option 2
  • auto_reloadbooleanrequired

    One offalse

  • setup_urlstringrequired

    Stripe Checkout URL to save a payment method

Errors 400 use the standard error format.

curl -X PATCH "https://reelmirror.com/api/v1/billing/balance" \
  -H "Authorization: Bearer $REELMIRROR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
Response 200 (example)
{
  "data": {
    "balance_cents": 1,
    "balance_dollars": "string",
    "auto_reload": true,
    "reload_threshold_cents": 1,
    "reload_amount_cents": 1
  }
}

Create top-up checkout session

POST/v1/billing/topup

Scope billing:write

Create a Stripe Checkout session to add credits to your balance. Requires billing:write scope.

Request body application/json

  • amount_centsintegerrequired

    Amount in cents to top up. Must be one of the supported values.

Response 200

Stripe Checkout URL to complete payment Fields below are inside data.

  • urlstringrequired

    Stripe Checkout URL

Errors 400 use the standard error format.

curl -X POST "https://reelmirror.com/api/v1/billing/topup" \
  -H "Authorization: Bearer $REELMIRROR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "amount_cents": 1
}'
Response 200 (example)
{
  "data": {
    "url": "https://reelmirror.com/…"
  }
}

List transactions

GET/v1/billing/transactions

Bearer token

Query parameters

  • limitinteger≤ 100default 20

    Maximum number of results to return

  • offsetintegerdefault 0

    Number of results to skip

Response 200

Transaction history

  • dataarray of object
    8 item attributes
    • idstringuuid
    • amount_centsinteger
    • operation_typestring
    • descriptionstring
    • created_atstringdate-time
    • generated_post_idstring | nulluuid
    • generated_media_item_idstring | nulluuid
    • refund_of_idstring | nulluuid
  • countinteger
curl "https://reelmirror.com/api/v1/billing/transactions" \
  -H "Authorization: Bearer $REELMIRROR_API_KEY"
Response 200 (example)
{
  "data": [
    {
      "id": "8f14e45f-ceea-4e7a-9c2d-3b1a5f2e7c10",
      "amount_cents": 1,
      "operation_type": "string",
      "description": "string",
      "created_at": "2026-09-30T17:00:00.000Z",
      "generated_post_id": "c9f0f895-fb98-4b91-9e3f-1d2a6b7c8d20",
      "generated_media_item_id": "45c48cce-2e2d-4fbd-8a1c-5e6f7a8b9c30",
      "refund_of_id": "d3d94468-02a4-4c5e-b6f7-0a1b2c3d4e40"
    }
  ],
  "count": 1
}

Create SetupIntent for headless card attachment

POST/v1/billing/setup-intent

Scope billing:write

Creates a Stripe SetupIntent so an agent can attach a payment method headlessly using the Stripe SDK (no browser redirect required). After the SetupIntent is confirmed, Stripe fires setup_intent.succeeded and the server automatically grants the $5 welcome bonus if none has been issued yet.

Required scope: billing:write.

Request body application/json

object

Response 200

SetupIntent created Fields below are inside data.

  • client_secretstring

    Stripe SetupIntent client secret (format: `seti_xxx_secret_xxx`). Pass to `stripe.confirmCardSetup()` or the server-side Stripe SDK to complete card attachment.

Errors 401, 403 use the standard error format.

curl -X POST "https://reelmirror.com/api/v1/billing/setup-intent" \
  -H "Authorization: Bearer $REELMIRROR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
Response 200 (example)
{
  "data": {
    "client_secret": "string"
  }
}