Skip to content
Developers

Payments

Read payment histories and run previewed, confirmed checkouts, subscription changes and refunds from the API.

The payments endpoints let a script or an agent read what an account bought and sold, start a checkout, cancel or resume a subscription, open a billing portal, and request or decide ticket refunds. They do the same things as the app's payment screens, with one rule on top: every action is previewed first and then confirmed with the exact text the preview returned. New purchases are paid in the buyer's browser; a few confirmed actions on existing subscriptions and refunds take effect straight away (see What happens after you confirm).

New in API and CLI 0.5.0. Products, plans and the Stripe connection are on Products, subscription plans and Stripe; ticket setup is on Tickets. For what buyers see in the app, read Tickets and subscriptions.

#Scopes and access

ScopeAllows
payments:readRead payment, subscription, ticket, refund, sales, quest-credit and metaverse-time histories, and quest credit and metaverse time balances. Your AI credits use the same scope.
payments:writePreview and run checkouts, subscription and membership changes, billing portals and refund actions.
  • Buyer actions are yours. Purchases, subscriptions and refund requests always belong to the key owner. No key can act on another person's purchases or payment methods.
  • Seller actions. Sales history, balances and refund decisions for an account you run need ?account= (histories and balances) or a target that belongs to it, plus communities:read or communities:write, the key's account allowlist, and a current owner or admin role there.
  • After a downgrade. Keys with these scopes keep managing existing payments and subscriptions when the account drops below Honey Bee.
  • What is not possible. Payouts, wallet transfers, choosing prices or recipients, using payment-provider IDs that don't belong to your own checkout (finalizing takes only the session or order ID of a checkout you started), and starting a new purchase without the buyer's browser. Nothing is retried automatically.

#Histories

GET/api/v1/payments/{history}Scopepayments:read

{history} is one of the lists below. Lists are paginated with limit (1 to 100, default 25) and cursor, except subscriptions, which returns one short list (pagination). Only account, limit and cursor are accepted as query parameters.

{history}Contents?account=
historyYour payments.No: always yours.
subscriptionsYour subscriptions, with the IDs used by subscription actions.No: always yours.
ticketsTicket purchases.Yes, for a seller you run.
refundsTicket refund requests.Yes, for a seller you run.
salesAn account's sales.Yes, for a seller you run.
quest-creditsQuest credit purchases.Yes, for an account you run.
metaverse-timeMetaverse time purchases.Yes, for an account you run.

Ticket history leaves out the amount paid when Hive3 did not keep the original price; it never shows today's price as what was paid.

bash
curl "https://app.hive3.tech/api/v1/payments/sales?account=@design-guild&limit=50" \
  -H "Authorization: Bearer $HIVE_API_KEY"

#Balances

GET/api/v1/payments/balancesScopepayments:read

Returns the quest credits and metaverse time an account has left right now: this month's plan allowance plus purchases that are not used up or expired. New in the API on November 20, 2026, and in CLI 0.8.0.

NameInTypeRequiredNotes
accountquerystringNoAccount ID or @handle of an account you own or administer. Default: the key owner. Needs communities:read, the key's account allowlist and a current owner or admin role there.
bash
curl "https://app.hive3.tech/api/v1/payments/balances?account=@design-guild" \
  -H "Authorization: Bearer $HIVE_API_KEY"

Returns 200. Quest credits come per plan: single for quests up to 7 days and bundle for quests up to 30 days (maxQuestDays). total is this month's included credits plus every credit bought; remaining is what can still start a quest. Metaverse time is in minutes for the current month (YYYY-MM, UTC): remainingMinutes is the allowance left plus the purchased time left. Allowances reset on the first day of each month.

json
{
  "data": {
    "account": { "accountId": "account_123", "handle": "design-guild", "name": "Design Guild" },
    "questCredits": {
      "single": { "maxQuestDays": 7, "remaining": 2, "total": 3 },
      "bundle": { "maxQuestDays": 30, "remaining": 1, "total": 1 }
    },
    "metaverseTime": {
      "month": "2026-11",
      "monthlyAllowanceMinutes": 60,
      "allowanceUsedMinutes": 30,
      "allowanceRemainingMinutes": 30,
      "purchasedRemainingMinutes": 120,
      "remainingMinutes": 150
    }
  }
}
  • 400 invalid_request: Unknown query parameter: <name>, or Account not found.
  • 403 insufficient_scope: Managed seller access requires the communities scope when account names another account and the key lacks communities:read.
  • 403 forbidden: API key does not include this managed account, or Only account owners and admins can manage this seller.

#Preview, then confirm

Every action is two requests to the same body shape.

  1. Preview

    POST /api/v1/payments/preview with the operation, its target and the fields the operation needs. Nothing changes. The response names the account, the provider and a confirm text that describes exactly what will happen, including the amount or effect.

    bash
    curl -X POST https://app.hive3.tech/api/v1/payments/preview \
      -H "Authorization: Bearer $HIVE_API_KEY" \
      -H "Content-Type: application/json" \
      -d '{"operation":"checkout.ticket","target":"ticket_123","provider":"stripe"}'
    json
    { "data": { "ownerRef": "account_456", "provider": "stripe", "confirm": "PAYMENTS account_123 stripe checkout.ticket ticket_123 …" } }
  2. Check it with a person

    Show the account, target, provider and amount to the person who pays or decides, and get their approval for that exact action.

  3. Operate

    POST /api/v1/payments/operate with the same fields plus "confirmed": true, the confirm text copied unchanged, and a new requestId of 1 to 128 characters.

    bash
    curl -X POST https://app.hive3.tech/api/v1/payments/operate \
      -H "Authorization: Bearer $HIVE_API_KEY" \
      -H "Content-Type: application/json" \
      -d '{"operation":"checkout.ticket","target":"ticket_123","provider":"stripe","confirmed":true,"confirm":"PAYMENTS account_123 stripe checkout.ticket ticket_123 …","requestId":"buy-ticket-123-001"}'

Before anything happens, Hive3 checks the confirmation and your access again. If something changed since the preview, such as the price, the request fails with 400 invalid_request and the new confirm text in error.confirm; preview again and ask again.

#What happens after you confirm

  • New purchases return a link instead of charging anything. Checkouts, billing portals and PayPal plan changes return { "url": "…", "private": true, "browserRequired": true, "message": "…" }. The buyer opens it privately in their own browser and pays or approves there. Treat the link like a password: do not log, store or share it.
  • Some confirmed actions take effect straight away, with no browser step. Upgrading your Hive3 membership with membership.revise charges the payment method already on your Stripe membership at once for the prorated difference, as the app's upgrade button does; if the payment fails, the plan stays as it was. Moving to a longer billing period also starts at once. A downgrade or a shorter period takes effect at the end of the current period and charges nothing. Cancel and resume change renewal only. Approving a refund sends the money back to the buyer through the payment provider. Confirm these only when the person has asked for exactly that change.

Preview allows 60 requests per minute and operate 20 per minute. Bodies are limited to 8 KiB, and unknown fields are rejected with 400.

#Operations

operationtargetOther fieldsWhat it does
checkout.subscriptionPlan IDprovider (stripe or paypal)Starts a subscription checkout.
checkout.ticketTicket IDproviderStarts a ticket checkout.
checkout.membershipself, or an account you owntier (honey, swarm or royal), billingPeriod (optional: month, quarter or year; default month)Starts a Hive3 membership checkout on Stripe.
checkout.quest-creditAccount IDplanType (single or bundle)Buys a quest credit on Stripe.
checkout.metaverse-timeAccount IDquantity (hours, 1 to 100)Buys metaverse time on Stripe.
finalize.stripeStripe checkout session IDkind (membership, subscription, ticket, questCredit or metaverseTime)Records a Stripe checkout you paid for.
finalize.subscriptionPlan IDcheckoutIntentId, paypalSubscriptionIdRecords a PayPal subscription you approved.
finalize.ticketTicket IDorderIdRecords a PayPal ticket order you approved.
subscription.cancel, subscription.resumeSubscription IDNoneStops or restarts renewal of a subscription you hold.
subscription.portalSubscription IDNoneReturns a Stripe billing portal link for payment methods, invoices and cancelling.
subscription.reviseSubscription IDnewPlanIdSwitches a PayPal subscription to another plan; you approve the change in the browser.
membership.cancel, membership.resume, membership.portalselfNoneThe same for your Hive3 membership.
membership.reviseselftier, billingPeriod (optional; keeps the current period when left out)Changes your Hive3 membership plan or billing period. An upgrade charges your saved payment method immediately; a downgrade starts at the next renewal. See Membership billing periods.
refund.requestPurchase ID (from tickets you bought)reason (optional)Asks the seller for a ticket refund.
refund.approve, refund.rejectRefund request IDreviewNote (optional)The seller's decision on a refund request. Owners and admins only.

Finalizing works only for the person who paid: you cannot finalize someone else's checkout. A membership checkout for an account you own is for its owner only; after that, the account manages its membership with its own sign-in. Changing the plan of a Stripe creator subscription is not supported, nor is managing an older PayPal Hive3 membership.

#Membership billing periods

billingPeriod sets how often a Hive3 membership is billed: month at full price, quarter at 10% off paid up front every 3 months, or year at 20% off paid up front once a year. Any other value returns 400 invalid_request (billingPeriod must be month, quarter or year). The preview's amount is the price of one whole period, for example 720.00 USD yearly honey ….

For membership.revise, the preview says when the change happens:

End of amountWhen
IMMEDIATE PRORATED INVOICEA higher tier, or the same tier with a longer period. It starts now. With the same period, the prorated difference is charged and the renewal date stays; with a new period, the unused part of the current plan is credited, the new period is charged today and the billing date resets to today.
SCHEDULE NEXT BILLING PERIODA lower tier, or the same tier with a shorter period. It starts at the next renewal, with no charge now. A higher tier always starts now, even with a shorter period.
CANCEL SCHEDULED CHANGEYour current tier and period while a change is scheduled. It cancels that change.
NO CHANGEYour current tier and period, with nothing scheduled.

Included quest credits and metaverse time reset every calendar month whatever the billing period.

#When the outcome is unknown

Each confirmed action is recorded once. If a request times out or returns 409 conflict with a state field, the outcome is not known yet: do not send a new action. Check the histories, the browser or the provider first. Reuse the same requestId only to repeat the identical request.

  • A second checkout for something already being paid is blocked.
  • A pending or failed refund does not remove the buyer's access; a completed refund does.
  • If two separate payments for the same thing were both completed, both are kept so each can be managed or refunded.