API reference
Billing API
Balance and transaction history
BetaUpdated
- Base URL
- https://reelmirror.com/api
- Authentication
- Authorization: Bearer rm_…
- Contract
- openapi.json
Get balance
GET/v1/billing/balance
Response 200
Current balance and auto-reload settings Fields below are inside data.
balance_centsintegerbalance_dollarsstringauto_reloadbooleanreload_threshold_centsinteger | nullreload_amount_centsinteger | null
curl "https://reelmirror.com/api/v1/billing/balance" \
-H "Authorization: Bearer $REELMIRROR_API_KEY"const response = await fetch(`https://reelmirror.com/api/v1/billing/balance`, {
method: "GET",
headers: {
Authorization: `Bearer ${process.env.REELMIRROR_API_KEY}`,
},
});
const payload = await response.json();import os
import requests
response = requests.request(
"GET",
f"https://reelmirror.com/api/v1/billing/balance",
headers={
"Authorization": f"Bearer {os.environ['REELMIRROR_API_KEY']}",
},
)
payload = response.json(){
"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
billing:writeConfigure 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_reloadbooleanEnable or disable automatic balance reload
reload_threshold_centsinteger0–5000Balance level (in cents) that triggers an auto-reload. Min 0, max 5000.
reload_amount_centsinteger100–5000Amount (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
dataobject5 child attributes
balance_centsintegerbalance_dollarsstringauto_reloadbooleanreload_threshold_centsinteger | nullreload_amount_centsinteger | null
Option 2
auto_reloadbooleanrequiredOne of
falsesetup_urlstringrequiredStripe 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 '{}'const response = await fetch(`https://reelmirror.com/api/v1/billing/balance`, {
method: "PATCH",
headers: {
Authorization: `Bearer ${process.env.REELMIRROR_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({}),
});
const payload = await response.json();import os
import requests
response = requests.request(
"PATCH",
f"https://reelmirror.com/api/v1/billing/balance",
headers={
"Authorization": f"Bearer {os.environ['REELMIRROR_API_KEY']}",
},
json={},
)
payload = response.json(){
"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
billing:writeCreate a Stripe Checkout session to add credits to your balance. Requires billing:write scope.
Request body application/json
amount_centsintegerrequiredAmount 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.
urlstringrequiredStripe 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
}'const response = await fetch(`https://reelmirror.com/api/v1/billing/topup`, {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.REELMIRROR_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"amount_cents": 1
}),
});
const payload = await response.json();import os
import requests
response = requests.request(
"POST",
f"https://reelmirror.com/api/v1/billing/topup",
headers={
"Authorization": f"Bearer {os.environ['REELMIRROR_API_KEY']}",
},
json={
"amount_cents": 1
},
)
payload = response.json(){
"data": {
"url": "https://reelmirror.com/…"
}
}List transactions
GET/v1/billing/transactions
Query parameters
limitinteger≤ 100default 20Maximum number of results to return
offsetintegerdefault 0Number of results to skip
Response 200
Transaction history
dataarray of object8 item attributes
idstringuuidamount_centsintegeroperation_typestringdescriptionstringcreated_atstringdate-timegenerated_post_idstring | nulluuidgenerated_media_item_idstring | nulluuidrefund_of_idstring | nulluuid
countinteger
curl "https://reelmirror.com/api/v1/billing/transactions" \
-H "Authorization: Bearer $REELMIRROR_API_KEY"const response = await fetch(`https://reelmirror.com/api/v1/billing/transactions`, {
method: "GET",
headers: {
Authorization: `Bearer ${process.env.REELMIRROR_API_KEY}`,
},
});
const payload = await response.json();import os
import requests
response = requests.request(
"GET",
f"https://reelmirror.com/api/v1/billing/transactions",
headers={
"Authorization": f"Bearer {os.environ['REELMIRROR_API_KEY']}",
},
)
payload = response.json(){
"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
billing:writeCreates 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
Response 200
SetupIntent created Fields below are inside data.
client_secretstringStripe 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 '{}'const response = await fetch(`https://reelmirror.com/api/v1/billing/setup-intent`, {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.REELMIRROR_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({}),
});
const payload = await response.json();import os
import requests
response = requests.request(
"POST",
f"https://reelmirror.com/api/v1/billing/setup-intent",
headers={
"Authorization": f"Bearer {os.environ['REELMIRROR_API_KEY']}",
},
json={},
)
payload = response.json(){
"data": {
"client_secret": "string"
}
}