Menu

Credits and credit charges

The balance, buying credits, the credit history and statement, the credit charges, the low-balance warning, withdrawals and refunds.

The caller's balances and spend summary#

GET /credits/balance · operation getBalance

The account's credits: balances per credit type, their total, and spend over the last window_days (the total, the average per day and runway_days, how long the credits last at that pace; null when nothing was spent). Top up with POST /credits/topup. Needs a complete profile (403 profile-incomplete: see GET /auth/profile). Changes nothing. This call is not charged.

Credentialan API key holding the permission below, or a session (x-weird-auth: key)
Permissioncredits:read
Chargedno

Answer 200 (Balance): the result

  • balances, array of objects, required
    • credit_type, string, required
    • balance, string, required — a decimal amount as text
  • total, string, required — a decimal amount as text
  • spend, object, required
    • window_days, integer, required
    • total, string, required — a decimal amount as text
    • avg_per_day, string, required — a decimal amount as text
    • runway_days, number or null, required

Refusals ({"error": {"code", "message"}}; see errors):

StatusCodesWhen
401unauthorizedunauthorized
403insufficient-scope, profile-incomplete, terms-acceptance-requiredinsufficient-scope (an API key without the scope x-weird-scope names: use a key that holds it) or profile-incomplete (complete the profile first: GET /auth/profile says what is missing); terms-acceptance-required (the current terms of service or privacy notice are not accepted yet: required lists them; read them with GET /legal/documents and accept with POST /auth/legal/accept)
429rate-limitedrate-limited
502upstream-unavailableupstream-unavailable (try again later)
503ledger-unavailableledger-unavailable (the credit account did not answer: try again later)

Example

curl -X GET 'https://api.weird.ro/credits/balance' \
  -H "Authorization: Bearer $WEIRD_API_KEY"

With the CLI (weird credits, weird status):

$ weird credits$ weird status

MCP: weird_status, weird_credits_balance.

The credit charges in force, and the next ones when announced#

GET /credits/charges · operation getCharges

The credit charges in force (version, created_at, effective_at, charges: contract -> rate -> decimal credits); pending, the next version with its credit charges, when one is scheduled; and upcoming, what that scheduled change does: version, effective_at, baseline_version, changed_contracts, increases and decreases (each rate contract, key, sub_key, old, new) and announced (whether the customers it affects were told). Both are absent when nothing is scheduled. This call is not charged.

Credentialan API key holding the permission below, or a session (x-weird-auth: key)
Permissioncredits:read
Chargedno

Answer 200 (CreditCharges): the result

  • version, integer, required
  • created_at, string, required
  • effective_at, string, required
  • charges, object, required — contract (such as dns.manage, domains.register, recurring.vps-hourly, ipfs.reads) -> rate -> credits as a decimal string; an operation's x-weird-charged names the contract and the rate it is charged at
    • each value: object — rate name (such as per_request, per_year, per_hour, per_mb_hour) -> credits
  • pending, object
    • version, integer, required
    • effective_at, string, required
    • charges, object, required — contract (such as dns.manage, domains.register, recurring.vps-hourly, ipfs.reads) -> rate -> credits as a decimal string; an operation's x-weird-charged names the contract and the rate it is charged at
      • each value: object — rate name (such as per_request, per_year, per_hour, per_mb_hour) -> credits
  • upcoming, object — the scheduled change against the credit charges in force; absent when nothing is scheduled
    • version, integer, required
    • effective_at, string, required
    • baseline_version, integer or null
    • changed_contracts, array of strings, required
    • increases, array of objects, required
      • contract, string, required
      • key, string, required
      • sub_key, string or null
      • old, string, required — a decimal amount as text
      • new, string, required — a decimal amount as text
    • decreases, array of objects, required
      • contract, string, required
      • key, string, required
      • sub_key, string or null
      • old, string, required — a decimal amount as text
      • new, string, required — a decimal amount as text
    • announced, boolean, required — whether the change's announcement was sent to the customers it affects

Refusals ({"error": {"code", "message"}}; see errors):

StatusCodesWhen
401unauthorizedunauthorized
403insufficient-scope, terms-acceptance-requiredinsufficient-scope (an API key without the scope x-weird-scope names: use a key that holds it); terms-acceptance-required (the current terms of service or privacy notice are not accepted yet: required lists them; read them with GET /legal/documents and accept with POST /auth/legal/accept)
429rate-limitedrate-limited
502upstream-unavailableupstream-unavailable (try again later)
503charges-not-published, ledger-unavailableledger-unavailable (the credit account did not answer: try again later) or charges-not-published (the credit charges cannot be read now: try again later)

Example

curl -X GET 'https://api.weird.ro/credits/charges' \
  -H "Authorization: Bearer $WEIRD_API_KEY"

With the CLI (weird credits charges, weird domains check, weird status):

$ weird credits charges$ weird domains check <domain>$ weird status

MCP: weird_credits_charges.

The caller's credit history#

GET /credits/ledger · operation listLedger

Every credit entry of the account (purchases, charges, refunds, grants), newest first, cursor paginated. This call is not charged.

Credentialan API key holding the permission below, or a session (x-weird-auth: key)
Permissioncredits:read
Chargedno

Parameters

NameInTypeRequiredDescription
cursorquerystringnoan integer, the next_cursor of a previous page
limitqueryintegernoan integer page size
kindquerystringnoonly entries of that kind
typequerystringnoonly entries of that credit type
contractquerystringnoonly charges of that contract

Answer 200 (CreditEntryPage): the result

  • entries, array of objects, required
    • seq, integer, required
    • credit_type, string, required
    • promotion_kind, string or null — a promotional grant: what kind of promotion, when known
    • id, string, required
    • expires_at, string or null — a promotional grant: when what is left of it lapses; null when never
    • promotion, string — a promotional grant: the id of the promotion it came from (such as domain-allowance, the included allowance of a domain)
    • invoice_id, string or null — purchases
    • kind, string, required
    • amount, string, required — a decimal amount as text
    • reason, string or null, required
    • created_at, string, required
    • balance_after, string, required — a decimal amount as text
    • total_after, string, required — a decimal amount as text
  • next_cursor, integer or null, required

Refusals ({"error": {"code", "message"}}; see errors):

StatusCodesWhen
400invalid-paramsinvalid-params (a non-integer cursor or limit)
401unauthorizedunauthorized
403insufficient-scope, profile-incomplete, terms-acceptance-requiredinsufficient-scope (an API key without the scope x-weird-scope names: use a key that holds it) or profile-incomplete (complete the profile first: GET /auth/profile says what is missing); terms-acceptance-required (the current terms of service or privacy notice are not accepted yet: required lists them; read them with GET /legal/documents and accept with POST /auth/legal/accept)
429rate-limitedrate-limited
502upstream-unavailableupstream-unavailable (try again later)
503ledger-unavailableledger-unavailable (the credit account did not answer: try again later)

Example

curl -X GET 'https://api.weird.ro/credits/ledger' \
  -H "Authorization: Bearer $WEIRD_API_KEY"

With the CLI (weird credits history):

$ weird credits history

MCP: weird_credits_history.

The caller's promotional credit#

GET /credits/promotional · operation getPromotionalBalance

The account's promotional credit: the balance, what is available, what is lapsing and every promotional grant that still holds credit (referral rewards among them). This call is not charged.

Credentialan API key holding the permission below, or a session (x-weird-auth: key)
Permissioncredits:read
Chargedno

Answer 200 (PromoBalance): the result

  • user_id, string
  • credit_type, string, required — promo
  • balance, string, required — the promotional balance
  • available, string, required — what can be spent: the balance less what is lapsing
  • lapsing, string, required — past its expiry and about to leave the balance
  • deficit, string, required — a decimal amount as text
  • grants, array of objects, required — every grant that still holds credit, in the order it is spent (soonest expiry first)
    • seq, integer, required
    • promotion, string or null
    • reference, string or null
    • amount, string, required — a decimal amount as text
    • remaining, string, required — a decimal amount as text
    • expires_at, string or null
    • created_at, string
    • lapsing, boolean, required — past its expiry: about to leave the balance

Refusals ({"error": {"code", "message"}}; see errors):

StatusCodesWhen
401unauthorizedunauthorized
403insufficient-scope, profile-incomplete, terms-acceptance-requiredinsufficient-scope (an API key without the scope x-weird-scope names: use a key that holds it) or profile-incomplete (complete the profile first: GET /auth/profile says what is missing); terms-acceptance-required (the current terms of service or privacy notice are not accepted yet: required lists them; read them with GET /legal/documents and accept with POST /auth/legal/accept)
429rate-limitedrate-limited
502upstream-unavailableupstream-unavailable (try again later)
503ledger-unavailableledger-unavailable (the credit account did not answer: try again later)

Example

curl -X GET 'https://api.weird.ro/credits/promotional' \
  -H "Authorization: Bearer $WEIRD_API_KEY"

With the CLI (weird credits promotional):

$ weird credits promotional

MCP: weird_credits_promotional.

The caller's statement: charges grouped per day and contract#

GET /credits/statement · operation statement

The account's credit history as a statement, newest first: the charges grouped per day, contract and resource (charge-group), every other entry (top-ups, refunds, grants) as it is (entry). days narrows the window; pass next_cursor as cursor for the next page. Needs a complete profile (403 profile-incomplete). Changes nothing. This call is not charged.

Credentialan API key holding the permission below, or a session (x-weird-auth: key)
Permissioncredits:read
Chargedno

Parameters

NameInTypeRequiredDescription
daysqueryintegerno
cursorquerystringnoa YYYY-MM-DD day, the next_cursor of a previous page

Answer 200 (StatementPage): the result

  • items, array of objects, required
    • seq, integer
    • resource, object
      • type, string
      • id, string
      • label, string or null
    • credit_type, string
    • id, string
    • count, integer
    • invoice_id, string or null
    • kind, string
    • type, string, required (one of charge-group, entry)
    • contract, string
    • amount, string — a decimal amount as text
    • reason, string or null
    • created_at, string
    • balance_after, string — a decimal amount as text
    • day, string
    • total_after, string — a decimal amount as text
    • last_at, string
  • next_cursor, string or null, required

Refusals ({"error": {"code", "message"}}; see errors):

StatusCodesWhen
400invalid-paramsinvalid-params (a field is wrong: field names it)
401unauthorizedunauthorized
403insufficient-scope, profile-incomplete, terms-acceptance-requiredinsufficient-scope (an API key without the scope x-weird-scope names: use a key that holds it) or profile-incomplete (complete the profile first: GET /auth/profile says what is missing); terms-acceptance-required (the current terms of service or privacy notice are not accepted yet: required lists them; read them with GET /legal/documents and accept with POST /auth/legal/accept)
429rate-limitedrate-limited
502upstream-unavailableupstream-unavailable (try again later)
503ledger-unavailableledger-unavailable (the credit account did not answer: try again later)

Example

curl -X GET 'https://api.weird.ro/credits/statement' \
  -H "Authorization: Bearer $WEIRD_API_KEY"

With the CLI (weird credits statement):

$ weird credits statement

MCP: weird_credits_statement.

The top-up limits, presets and enabled providers#

GET /credits/topup · operation topupConfig

What a top-up may be: the min and max credits, the presets, the VAT rate, the currency, credit_price (the price of one credit: net, vat, total; null while no price of a credit is set: credits are not on sale and POST /credits/topup is refused with credits-not-on-sale), the payment providers the customer may choose, and the acknowledgement a top-up needs (its version, text and the request fields that must be true; the same as GET /legal/acknowledgements for kind topup, which needs no complete profile); start one with POST /credits/topup. Needs a complete profile (403 profile-incomplete). Changes nothing. This call is not charged.

Credentialan API key holding the permission below, or a session (x-weird-auth: key)
Permissionbilling:read
Chargedno

Parameters

NameInTypeRequiredDescription
langquerystringnothe language of the texts answered: ro or en (any other value is refused 400 invalid-params, field lang); without it, the Accept-Language header, else the signed-in account's language, else Romanian (one of ro, en)
Accept-Languageheaderstringnohonoured when the request names no lang (body field or query parameter): its first language the platform speaks (ro, en) by the header's own weights; else the signed-in account's language, else Romanian

Answer 200 (TopupConfig): the result

  • min, integer, required
  • max, integer, required
  • vat_percent, string, required — a decimal amount as text
  • presets, array of integers, required
  • currency, string, required (must be "RON")
  • credit_price, one of, required — null while no price of a credit is set: credits are not on sale (POST /credits/topup is refused 503 credits-not-on-sale)
    • variant 1: object — the price of one credit, what a customer pays per credit bought, set by weird with the VAT rate in force: the only price; everything else is a credit charge, in credits. A purchase is priced on its whole quantity (the credits at net, rounded to the ban, then the VAT on that, rounded to the ban), so its total may differ by a ban from credits x total; a purchase keeps the price it was bought at
      • net, string, required — before VAT: the price in force, two to four decimals
      • vat, string, required — the VAT on it, two to four decimals
      • total, string, required — VAT included, two to four decimals: what a visitor is shown first
      • currency, string, required (must be "RON")
    • variant 2: null
  • providers, array of objects, required
    • id, string, required (one of stripe, revolut)
    • label, string, required
  • acknowledgement, object, required
    • kind, string (one of topup, domain-order, stats-detail)
    • version, string, required
    • text, string, required
    • lang, string — the language of text: the request's lang, else Accept-Language, else the account's language, else Romanian; one version covers both languages (one of ro, en)
    • fields, array of strings, required — the request fields that must be true
    • standing, boolean — true: an acceptance kept for the account, sent again only when version changes (detailed statistics); false: sent with every order
    • required, string — when the fields must be sent, and what already accepted means
    • relies_on, array of objects — the legal documents this acknowledgement relies on: kind (read it with read, GET /legal/documents/{kind}) and, in a live answer, its current version (null: not published yet, and the operation that asks for this acknowledgement is refused until it is)
      • kind, string
      • read, string
      • version, string or null

Refusals ({"error": {"code", "message"}}; see errors):

StatusCodesWhen
401unauthorizedunauthorized
403insufficient-scope, profile-incomplete, terms-acceptance-requiredinsufficient-scope (an API key without the route's scope: required, granted); profile-incomplete (complete the profile first: GET /auth/profile says what is missing); terms-acceptance-required (the current terms of service or privacy notice are not accepted yet: required lists them; read them with GET /legal/documents and accept with POST /auth/legal/accept)
429rate-limitedrate-limited

Example

curl -X GET 'https://api.weird.ro/credits/topup' \
  -H "Authorization: Bearer $WEIRD_API_KEY"

With the CLI (weird credits topup options, weird credits topup):

$ weird credits topup options$ weird credits topup [credits]

MCP: weird_topup_options.

Start a credit top-up#

POST /credits/topup · operation startTopup

A positive whole number of credits (or its string) within the limits and an enabled provider (default the first), and the two fields of the acknowledgement, both required and both true: immediate_start_requested (you ask us to start providing the services as soon as the payment arrives, within the 14-day withdrawal period) and withdrawal_terms_acknowledged (you confirm the text GET /legal/acknowledgements returns for kind topup, also under acknowledgement.text of GET /credits/topup and in this operation's x-weird-acknowledgement: withdrawing refunds only the unused part of the top-up, and the right is lost for a service fully performed). acknowledgement_version may name the version you showed; a stale one is refused 409 acknowledgement-outdated with the current version and text. The text, its version and the time are recorded with the order and mailed in the order confirmation. Answers the quote and the checkout URL: the credits at the price of one credit in force (credit_price of GET /credits/topup), rounded to the ban, and the VAT on that net; the order records that price and VAT rate, and its invoice and any refund of it use them, whatever the price is later. Refused 503 credits-not-on-sale while no price of a credit is set (nothing is ordered). Nothing is charged until the checkout is paid; an unpaid order lapses. Withdraw from a paid top-up within 14 days with POST /credits/withdrawals.

Credentialan API key holding the permission below, or a session (x-weird-auth: key)
Permissionbilling:write
Strong authenticationa session needs an authenticator enrolled and a recent proof of it (a step-up in the last 15 minutes, or totp_code / backup_code in the body); an API key is not asked — see authentication
Chargedno

Acknowledgement (kind topup, version 2026-11-21): the order carries immediate_start_requested and withdrawal_terms_acknowledged, all true, only after the person has read and accepted these words:

I ask weird to start providing the services immediately, as soon as my payment is received, within the 14-day withdrawal period. I understand that if I withdraw from this top-up I pay for what I used until I told weird I withdraw: only the credits of this top-up I have not used are refunded, at the price I paid including VAT, and that I lose the right of withdrawal for a service once it has been fully performed.

Parameters

NameInTypeRequiredDescription
Accept-Languageheaderstringnohonoured when the request names no lang (body field or query parameter): its first language the platform speaks (ro, en) by the header's own weights; else the signed-in account's language, else Romanian

Request body (StartTopup):

  • credits, one of, required — a positive whole number, or its string
    • variant 1: integer
    • variant 2: string
  • provider, string (one of stripe, revolut)
  • immediate_start_requested, boolean, required — required, true: you ask us to start providing the services as soon as the payment arrives, within the 14-day withdrawal period (must be true)
  • withdrawal_terms_acknowledged, boolean, required — required, true: you confirm the acknowledgement text of GET /credits/topup (acknowledgement.text) (must be true)
  • acknowledgement_version, string — optional: the version of the text you showed; a stale one is refused
  • lang, string — optional: the language of the text you showed (recorded with it); else the lang query parameter, else the Accept-Language header, else the account's language, else Romanian; any other value is refused 400 invalid-params (field lang) (one of ro, en)
  • totp_code, string (password) — a current authenticator code (the second factor) (a secret: shown once, never logged)
  • backup_code, string (password) — an unused backup code, instead of the authenticator code (a secret: shown once, never logged)

Answer 200 (TopupStarted): the result

  • order_ref, string, required
  • total, string, required — a decimal amount as text
  • credit_price, string, required — the net price of one credit this order is bought at (recorded on it)
  • vat, string, required — a decimal amount as text
  • currency, string, required (must be "RON")
  • net, string, required — the credits at that price, before VAT, rounded to the ban
  • checkout_url, string, required
  • vat_percent, string, required — a decimal amount as text
  • credits, integer, required

Refusals ({"error": {"code", "message"}}; see errors):

StatusCodesWhen
400invalid-paramsinvalid-params (amount, provider; field immediate_start_requested or withdrawal_terms_acknowledged)
401unauthorizedunauthorized
403account-suspended, enrolment-required, insufficient-scope, not-available, profile-incomplete, step-up-required, terms-acceptance-requiredinsufficient-scope (an API key without the route's scope: required, granted); profile-incomplete (complete the profile first: GET /auth/profile says what is missing) or not-available (we cannot accept this request for these details: write to the abuse contact named in the answer); enrolment-required (a session caller whose account has no authenticator: enrol one first) or step-up-required (a session without a recent step-up: POST /auth/step-up, then retry); account-suspended (the account is restricted while a report about it is reviewed: reading, support tickets and the copy of its data keep working; contact is the address to write to, GET /auth/account/restrictions says more); terms-acceptance-required (the current terms of service or privacy notice are not accepted yet: required lists them; read them with GET /legal/documents and accept with POST /auth/legal/accept)
409acknowledgement-outdated, conflictacknowledgement-outdated (the acknowledgement text changed: the current version and text are in the answer), or conflict (another top-up of the account is being started)
422invalid-totpinvalid-totp (a wrong or replayed authenticator code)
429rate-limited, too-many-open-ordersrate-limited or too-many-open-orders
502provider-unavailableprovider-unavailable (the payment provider did not answer: try again)
503company-identity-incomplete, credits-not-on-sale, payments-disabledpayments-disabled (payments are switched off now: try again later), credits-not-on-sale (credits are not on sale now: nothing was ordered) or company-identity-incomplete (the company details are not complete: nothing was ordered)

Example

curl -X POST 'https://api.weird.ro/credits/topup' \
  -H "Authorization: Bearer $WEIRD_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"credits":1,"immediate_start_requested":true,"withdrawal_terms_acknowledged":true}'

With the CLI (weird credits topup):

$ weird credits topup [credits]

MCP: weird_topup_start.

A top-up order of the caller#

GET /credits/topup/{id} · operation topupStatus

An open order is checked with its payment provider first, so a payment just made shows at once. This call is not charged.

Credentialan API key holding the permission below, or a session (x-weird-auth: key)
Permissionbilling:read
Chargedno

Parameters

NameInTypeRequiredDescription
idpathstringyes

Answer 200 (TopupOrder): the result

  • order_ref, string, required
  • total, string — a decimal amount as text
  • credit_price, string or null — the net price of one credit the order was bought at, two to four decimals (recorded on the order; for an older or historical order, its net over its credits): its invoice and any refund use it, never the price in force
  • currency, string, required
  • provider, string, required
  • invoice_id, string or null
  • state, string, required (one of created, pending, completed, failed, cancelled)
  • checkout_url, string or null — open orders only
  • created_at, string, required
  • vat_percent, string — a decimal amount as text
  • completed_at, string or null
  • credits, integer, required
  • imported, boolean — lists only: a historical order of the previous platform (a read-only record)
  • purpose, string (one of topup, credit-gift)

Refusals ({"error": {"code", "message"}}; see errors):

StatusCodesWhen
401unauthorizedunauthorized
403insufficient-scope, profile-incomplete, terms-acceptance-requiredinsufficient-scope (an API key without the route's scope: required, granted); profile-incomplete (complete the profile first: GET /auth/profile says what is missing); terms-acceptance-required (the current terms of service or privacy notice are not accepted yet: required lists them; read them with GET /legal/documents and accept with POST /auth/legal/accept)
404not-foundnot-found
429rate-limitedrate-limited

Example

curl -X GET 'https://api.weird.ro/credits/topup/{id}' \
  -H "Authorization: Bearer $WEIRD_API_KEY"

With the CLI (weird credits topup status, weird credits topup):

$ weird credits topup status <order>$ weird credits topup [credits]

MCP: weird_topups.

The caller's orders, newest first#

GET /credits/topups · operation listTopups

One page of the caller's orders paid through a checkout: top-ups and gifts (purpose topup or credit-gift), in every state, each as GET /credits/topup/{id} shows it plus imported (true for an order of the previous platform: a read-only record). next_cursor names the next page (null on the last). This call is not charged.

Credentialan API key holding the permission below, or a session (x-weird-auth: key)
Permissionbilling:read
Chargedno

Parameters

NameInTypeRequiredDescription
cursorquerystringnothe next_cursor of the previous page
limitqueryintegerno1 to 100, default 25 (default 25; 1 to 100)
purposequerystringnotopup or credit-gift; default both

Answer 200 (TopupOrderList): the result

  • orders, array of objects, required
    • order_ref, string, required
    • total, string — a decimal amount as text
    • credit_price, string or null — the net price of one credit the order was bought at, two to four decimals (recorded on the order; for an older or historical order, its net over its credits): its invoice and any refund use it, never the price in force
    • currency, string, required
    • provider, string, required
    • invoice_id, string or null
    • state, string, required (one of created, pending, completed, failed, cancelled)
    • checkout_url, string or null — open orders only
    • created_at, string, required
    • vat_percent, string — a decimal amount as text
    • completed_at, string or null
    • credits, integer, required
    • imported, boolean — lists only: a historical order of the previous platform (a read-only record)
    • purpose, string (one of topup, credit-gift)
  • next_cursor, string or null, required

Refusals ({"error": {"code", "message"}}; see errors):

StatusCodesWhen
400invalid-paramsinvalid-params (field cursor, limit or purpose)
401unauthorizedunauthorized
403insufficient-scope, profile-incomplete, terms-acceptance-requiredinsufficient-scope (an API key without the route's scope: required, granted); profile-incomplete (complete the profile first: GET /auth/profile says what is missing); terms-acceptance-required (the current terms of service or privacy notice are not accepted yet: required lists them; read them with GET /legal/documents and accept with POST /auth/legal/accept)
429rate-limitedrate-limited

Example

curl -X GET 'https://api.weird.ro/credits/topups' \
  -H "Authorization: Bearer $WEIRD_API_KEY"

With the CLI (weird credits topups):

$ weird credits topups

MCP: weird_topups.

The low-balance warning of the account#

GET /credits/warning · operation getCreditWarning

When the account is warned that its credits will run out: enabled, runway_hours (warned once when the credits left last fewer hours than this at the projected hourly spend; default 72), min_balance (also warned once when the balance falls under this amount; null: no amount), critical_hours (a second, stronger warning when fewer than this many hours are left: 24). status is what the last check saw: level (none, low: the first warning was sent, critical: the second was sent), balance, burn_per_hour (what the account is projected to be charged per hour), estimate (complete, or partial when a product did not answer and its charges of the last 3 hours stood in for it), breakdown (one entry per product: product, per_hour, basis and, when projected, resources: servers by tier, volumes and snapshots by GB, stored content by MB times copies, active DNS zones by their records, tunnels and p2p apps, each at the credit charges in effect, whatever is on hold, suspended or not billed left out; usage, what is billed by use such as traffic and per-request calls, is the average of its charges over the last 3 hours), hours_left (null when nothing is billed), checked_at and notified_at. An account is checked about every hour. A warning is not repeated until the balance has recovered above the threshold. Change it with PUT /credits/warning. Changes nothing. This call is not charged.

Credentialan API key holding the permission below, or a session (x-weird-auth: key)
Permissionnotifications:read
Chargedno

Answer 200 (CreditWarningResult): the result

  • warning, object, required
    • enabled, boolean, required — whether the account is warned
    • runway_hours, integer, required — warned once when the credits left last fewer hours than this at the present hourly rate (24 to 720)
    • min_balance, string or null, required — also warned once when the balance falls under this amount (a decimal string); null: no amount
    • critical_hours, integer, required — the second, stronger warning is sent under this many hours left
    • status, object, required — what the last check saw: before the first check level is none and every other field null
      • level, string, required — none: no warning in progress; low: the first warning was sent; critical: the second was sent (one of none, low, critical)
      • balance, string or null, required — the balance seen, two decimals; null when it was not needed
      • burn_per_hour, string or null, required — the projected credits per hour: the sum of breakdown
      • estimate, string or null, required — partial: a product did not answer and its recent charges stood in for it (one of complete, partial, null)
      • breakdown, array of objects, required — how burn_per_hour is made up, one entry per product
        • product, string, required — vps: servers, volumes and snapshots; storage: stored content; dns: active zones; tunnels; p2p: apps; usage: what is billed by use (traffic, per-request calls) (one of vps, storage, dns, tunnels, p2p, usage)
        • per_hour, string, required — credits per hour
        • basis, string, required — projected: from what the account holds now at the credit charges in effect; recent-average: the charges of the last 3 hours, averaged (always for usage; for a product whose service did not answer) (one of projected, recent-average)
        • resources, integer — the billed resources counted, on a projected entry
      • hours_left, number or null, required — the estimated hours the credits last; null when nothing is billed by the hour
      • checked_at, string or null, required
      • notified_at, string or null, required — when the last warning was sent

Refusals ({"error": {"code", "message"}}; see errors):

StatusCodesWhen
401unauthorizedunauthorized
403insufficient-scope, terms-acceptance-requiredinsufficient-scope (an API key without the route's scope: required, granted); terms-acceptance-required (the current terms of service or privacy notice are not accepted yet: required lists them; read them with GET /legal/documents and accept with POST /auth/legal/accept)
429rate-limitedrate-limited

Example

curl -X GET 'https://api.weird.ro/credits/warning' \
  -H "Authorization: Bearer $WEIRD_API_KEY"

With the CLI (weird credits warning, weird credits warning show):

$ weird credits warning$ weird credits warning show

MCP: weird_credit_warning.

Change the low-balance warning of the account#

PUT /credits/warning · operation setCreditWarning

Any of enabled (true or false), runway_hours (a whole number of hours from 24 to 720) and min_balance (a positive amount of at most 1000000 as a decimal string with at most two decimals, or null to remove it); what is left out is kept. The new settings apply at the next check, within minutes: a lower threshold the account is already above ends a warning in progress, a higher one may send one. The warnings are emailed and shown among the notifications; they cannot be turned off in the email choices, only here. Answers the warning as GET /credits/warning does. This call is not charged.

Credentialan API key holding the permission below, or a session (x-weird-auth: key)
Permissionnotifications:write
Chargedno

Request body (SetCreditWarning):

  • enabled, boolean
  • runway_hours, integer (24 to 720)
  • min_balance, string or null — a positive amount of at most 1000000, at most two decimals; null removes it

Answer 200 (CreditWarningResult): the result

  • warning, object, required
    • enabled, boolean, required — whether the account is warned
    • runway_hours, integer, required — warned once when the credits left last fewer hours than this at the present hourly rate (24 to 720)
    • min_balance, string or null, required — also warned once when the balance falls under this amount (a decimal string); null: no amount
    • critical_hours, integer, required — the second, stronger warning is sent under this many hours left
    • status, object, required — what the last check saw: before the first check level is none and every other field null
      • level, string, required — none: no warning in progress; low: the first warning was sent; critical: the second was sent (one of none, low, critical)
      • balance, string or null, required — the balance seen, two decimals; null when it was not needed
      • burn_per_hour, string or null, required — the projected credits per hour: the sum of breakdown
      • estimate, string or null, required — partial: a product did not answer and its recent charges stood in for it (one of complete, partial, null)
      • breakdown, array of objects, required — how burn_per_hour is made up, one entry per product
        • product, string, required — vps: servers, volumes and snapshots; storage: stored content; dns: active zones; tunnels; p2p: apps; usage: what is billed by use (traffic, per-request calls) (one of vps, storage, dns, tunnels, p2p, usage)
        • per_hour, string, required — credits per hour
        • basis, string, required — projected: from what the account holds now at the credit charges in effect; recent-average: the charges of the last 3 hours, averaged (always for usage; for a product whose service did not answer) (one of projected, recent-average)
        • resources, integer — the billed resources counted, on a projected entry
      • hours_left, number or null, required — the estimated hours the credits last; null when nothing is billed by the hour
      • checked_at, string or null, required
      • notified_at, string or null, required — when the last warning was sent

Refusals ({"error": {"code", "message"}}; see errors):

StatusCodesWhen
400invalid-paramsinvalid-params (field enabled, runway_hours or min_balance)
401unauthorizedunauthorized
403insufficient-scope, terms-acceptance-requiredinsufficient-scope (an API key without the route's scope: required, granted); terms-acceptance-required (the current terms of service or privacy notice are not accepted yet: required lists them; read them with GET /legal/documents and accept with POST /auth/legal/accept)
429rate-limitedrate-limited

Example

curl -X PUT 'https://api.weird.ro/credits/warning' \
  -H "Authorization: Bearer $WEIRD_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'

With the CLI (weird credits warning set):

$ weird credits warning set

MCP: weird_credit_warning_set.

The withdrawal function: top-ups you may still withdraw from#

GET /credits/withdrawals · operation listWithdrawals

Every top-up still inside its withdrawal period (withdrawal_until: 14 days after it was paid, or 12 months more when no acknowledgement was recorded with it, extended_period true), newest first, with what withdrawing from it now would refund: refund_credits and refund_amount (RON, VAT included), to the payment it was made with. The unused part of a top-up is refunded: credit that cannot be refunded (promotional, carried over, received as a gift) is used first, then purchased credit, oldest top-up first (rule). withdrawal_open false: already withdrawn from, disputed, or nothing to refund. refunds lists every refund of the account (withdrawals, the closing refund, goodwill refunds) and where it stands. Withdraw with POST /credits/withdrawals. Changes nothing. This call is not charged.

Credentialan API key holding the permission below, or a session (x-weird-auth: key)
Permissionwithdrawals:read
Chargedno

Answer 200 (WithdrawalList): the result

  • withdrawable, array of objects, required
    • order_ref, string, required
    • total, string, required — a decimal amount as text
    • withdrawal_until, string or null, required
    • extended_period, boolean — no acknowledgement was recorded with the order: the period is 12 months longer
    • currency, string, required
    • refund_pay_by, string or null — the latest instant a withdrawal made now would be refunded by (14 days from now); null while withdrawal_open is false
    • not_refundable_reason, string or null
    • paid_at, string or null, required
    • refund_amount, string, required — RON, VAT included
    • withdrawal_id, string or null
    • provider, string or null
    • withdrawal_open, boolean, required — you may withdraw from it now
    • kind, string, required (one of topup, gift-returned)
    • unused_credits, string, required — a decimal amount as text
    • refundable, boolean, required — false: the payment is disputed
    • credits, string, required — a decimal amount as text
    • refund_credits, string, required — a decimal amount as text
  • refunds, array of objects, required
    • order_ref, string, required
    • needs_bank_details, boolean
    • currency, string, required
    • pay_by, string or null — the latest instant the refund is paid (for a withdrawal, 14 days from the request); null once it is final
    • id, string, required
    • rejection, string or null — why the refund was not made, in plain words, when state is rejected
    • requested_at, string
    • kind, string, required (one of withdrawal, closing, goodwill)
    • amount, string, required — RON, VAT included
    • state, string, required — awaiting-approval: the credit is set aside and the refund is being reviewed by our team; rejected: not refunded (see rejection), the credit is back in your balance (one of awaiting-approval, removing-credit, pending-provider, needs-bank-details, done, void, rejected)
    • ticket_id, string or null — the support ticket asking for your bank details
    • under_review, boolean — true while the refund is being reviewed by our team
    • paid_via, string or null — provider or bank, once paid
    • completed_at, string or null
    • credits, string, required — a decimal amount as text
  • rule, string, required

Refusals ({"error": {"code", "message"}}; see errors):

StatusCodesWhen
401unauthorizedunauthorized
403insufficient-scope, terms-acceptance-requiredinsufficient-scope (an API key without the route's scope: required, granted); terms-acceptance-required (the current terms of service or privacy notice are not accepted yet: required lists them; read them with GET /legal/documents and accept with POST /auth/legal/accept)
429rate-limitedrate-limited
503unavailableunavailable (your credits cannot be read right now)

Example

curl -X GET 'https://api.weird.ro/credits/withdrawals' \
  -H "Authorization: Bearer $WEIRD_API_KEY"

With the CLI (weird credits withdrawals, weird credits withdraw):

$ weird credits withdrawals$ weird credits withdraw <order>

MCP: weird_withdrawals.

Withdraw from a top-up#

POST /credits/withdrawals · operation withdraw

Withdraws from the contract of the top-up order_ref (as GET /credits/withdrawals lists it) within its withdrawal period, without giving a reason. The unused credit of that top-up is set aside from your balance at once (you can no longer spend it) and the refund is reviewed by our team; its price, VAT included, is refunded to the payment the top-up was made with by pay_by at the latest (14 days from your request); what you used before is not refunded. A payment that can no longer be refunded that way is refunded by bank transfer: we ask for your IBAN in a support ticket. You are emailed a confirmation of receipt naming that date. Answers 202 with the withdrawal (state awaiting-approval and under_review true while it is reviewed, then removing-credit, pending-provider once the credit is removed and the refund owed, needs-bank-details, done; void when the credit was used before it could be set aside; rejected, with rejection saying why in plain words, when it is not refunded: the credit is then back in your balance and you are emailed the reason). A repeat for the same top-up answers the withdrawal already made (200): it is never made twice; after a rejected one you may withdraw again within the period. Needs a current authenticator code (totp_code) or an unused backup code (backup_code) IN THIS REQUEST, from a session and an API key alike: a recent step-up is not enough (403 step-up-required without one; 403 enrolment-required while the account has no authenticator; 422 invalid-totp for a wrong or used code, and too many wrong codes are 429 rate-limited for a while). This call is not charged.

Credentialan API key holding the permission below, or a session (x-weird-auth: key)
Permissionwithdrawals:write
Strong authenticationthe body itself must carry totp_code or backup_code, from a session and an API key alike — see authentication
Chargedno
Retry safetya repeat is refused or changes nothing: a top-up is withdrawn from once: a repeat answers the withdrawal already made (200) and refunds nothing twice

Request body (Withdraw):

  • order_ref, string, required — the top-up to withdraw from
  • totp_code, string (password) — a current authenticator code (the second factor) (a secret: shown once, never logged)
  • backup_code, string (password) — an unused backup code, instead of the authenticator code (a secret: shown once, never logged)

Answer 200 (WithdrawalResult): a withdrawal from this top-up was made already: the same answer, the refund as it stands now (nothing is refunded twice)

  • withdrawal, object, required
    • order_ref, string, required
    • needs_bank_details, boolean
    • currency, string, required
    • pay_by, string or null — the latest instant the refund is paid (for a withdrawal, 14 days from the request); null once it is final
    • id, string, required
    • rejection, string or null — why the refund was not made, in plain words, when state is rejected
    • requested_at, string
    • kind, string, required (one of withdrawal, closing, goodwill)
    • amount, string, required — RON, VAT included
    • state, string, required — awaiting-approval: the credit is set aside and the refund is being reviewed by our team; rejected: not refunded (see rejection), the credit is back in your balance (one of awaiting-approval, removing-credit, pending-provider, needs-bank-details, done, void, rejected)
    • ticket_id, string or null — the support ticket asking for your bank details
    • under_review, boolean — true while the refund is being reviewed by our team
    • paid_via, string or null — provider or bank, once paid
    • completed_at, string or null
    • credits, string, required — a decimal amount as text

Answer 202 (WithdrawalResult): the result

  • withdrawal, object, required
    • order_ref, string, required
    • needs_bank_details, boolean
    • currency, string, required
    • pay_by, string or null — the latest instant the refund is paid (for a withdrawal, 14 days from the request); null once it is final
    • id, string, required
    • rejection, string or null — why the refund was not made, in plain words, when state is rejected
    • requested_at, string
    • kind, string, required (one of withdrawal, closing, goodwill)
    • amount, string, required — RON, VAT included
    • state, string, required — awaiting-approval: the credit is set aside and the refund is being reviewed by our team; rejected: not refunded (see rejection), the credit is back in your balance (one of awaiting-approval, removing-credit, pending-provider, needs-bank-details, done, void, rejected)
    • ticket_id, string or null — the support ticket asking for your bank details
    • under_review, boolean — true while the refund is being reviewed by our team
    • paid_via, string or null — provider or bank, once paid
    • completed_at, string or null
    • credits, string, required — a decimal amount as text

Refusals ({"error": {"code", "message"}}; see errors):

StatusCodesWhen
400invalid-paramsinvalid-params (field order_ref)
401unauthorizedunauthorized
403enrolment-required, insufficient-scope, step-up-required, terms-acceptance-requiredinsufficient-scope (an API key without the route's scope: required, granted); step-up-required (no code in this request) or enrolment-required (no authenticator enrolled); enrolment-required (a session caller whose account has no authenticator: enrol one first) or step-up-required (a session without a recent step-up: POST /auth/step-up, then retry); terms-acceptance-required (the current terms of service or privacy notice are not accepted yet: required lists them; read them with GET /legal/documents and accept with POST /auth/legal/accept)
404not-foundnot-found (no such paid top-up of yours)
409conflict, nothing-to-refund, payment-disputed, withdrawal-period-overwithdrawal-period-over, payment-disputed (the payment is disputed at the payment provider), nothing-to-refund (every credit of it was used) or conflict (another refund of the account is being prepared: retry)
422invalid-totpinvalid-totp (a wrong or replayed authenticator code)
429rate-limitedrate-limited
503unavailableunavailable (your credits cannot be read right now: nothing was done)

Example

curl -X POST 'https://api.weird.ro/credits/withdrawals' \
  -H "Authorization: Bearer $WEIRD_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"order_ref":"<order_ref>"}'

With the CLI (weird credits withdraw):

$ weird credits withdraw <order>

MCP: weird_withdraw.

This page is generated from the API's public document; it changes when the document does.