Skip to Content
Nib TipsNib Tips

Nib Tips

Examples use Arc testnet values (free faucet USDC). For production, swap in the mainnet column — see Networks.

A Nib Tip sends USDC from a reader (or agent) to the creator of a page. Tips are additive revenue — there is no locked content and no entitlement. The payment receipt is the product.

Tipping is the second money rail in Nibgate, alongside paid unlocks. Unlike an unlock, a tip never grants access; it just pays the creator.

Two paths — settled or held

Whether a tip lands instantly or is held depends on one thing: can we resolve the creator’s wallet?

Creator already on Nibgate (resolved)Creator unresolved (external page)
EndpointPOST /hub/tips/challenge → pay → POST /hub/tips/verifyPOST /hub/tips/hold → fund box → POST /hub/tips/hold
Resultsettled — USDC goes straight to the creator’s payeeheld — USDC sits in the domain’s no-key box
Refundable?No — already paid outYes — by the payer, until claimed
ExampleA subblog post, a verified creator siteAny random external URL

Refunds only ever apply to held tips. A resolved tip is recorded after successful verification (settled); Gateway withdrawal and fee-wallet distribution may still be pending. Neither a settled nor a claimed tip has a platform refund path. Holding exists purely for creators who aren’t on Nibgate yet.

Where each path fires

The UI and SDKs route by one rule: if the hub can resolve a recipient wallet for the URL, the tip settles; otherwise it holds. The /hub/tips/hold endpoint never tries to resolve — whoever calls it has already chosen the hold path.

  • Subblog post / verified creator site. GET /hub/resolve?url= returns the owner wallet from the hub index (per-article recipientWallet wins, otherwise the verified domain owner’s wallet). The payee is the creator’s fee wallet when the site runs hosted pay, otherwise the creator wallet itself. Challenge → pay → verify → settled in full. Never touches the holding factory. Not refundable.
  • Nibshare (/ns/<slug>). There is no domain-level creator record for an individual share, so the client passes the share’s owner wallet as the explicit recipient and follows challenge → verify → settled. Never held, never refundable. (A hold created against a nibshare URL would key to the platform host domain, where no creator site exists to claim it — don’t do this; the payer’s only recourse would be a refund.)
  • External URL with no resolution. No hub-index wallet, no page wallet → POST /hub/tips/hold. The hub keys the box to the content’s hostname (or an explicit domain), the payer funds it, and the row lands held. Refundable by that payer until the domain owner claims.

The hold path keys money to a domain, not a page. Only hold tips for domains a real creator site can later verify and claim. Holding for a made-up or platform-owned domain strands the funds except via payer refund.

Resolved: challenge → pay → verify → settled receipt Unresolved: box challenge → fund → verify → held receipt Claim: Hub verifies creator → privileged factory release → creator/treasury Refund: Hub verifies payer → privileged factory refund → original payer

Endpoints

Canonical bare routes on the hub host — mainnet https://api.nibgate.xyz, testnet https://testnet-api.nibgate.xyz (see Networks).

MethodRouteWhoPurpose
POST/hub/tips/challengepayerTip challenge for a resolved creator (x402 envelope, payTo)
POST/hub/tips/verifypayerRecord a settled tip after paying the challenge
POST/hub/tips/holdpayerChallenge (returns box) then record a held tip (with txHash)
GET/hub/tips/held?domain=anyonePublic exact-domain lookup of pending tips; works for external sites too
POST/hub/tips/claimcreatorRelease a domain’s box to the verified owner
POST/hub/tips/refundpayerRefund unclaimed held tips to the payer

POST /hub/tips/hold

Called twice. Without a proof it returns the box; with a txHash it records the held tip.

# 1. Get the box for the domain curl -s https://testnet-api.nibgate.xyz/hub/tips/hold \ -H 'content-type: application/json' \ -d '{"contentUrl":"https://ext.example/post","amount":"0.05","domain":"ext.example","paymentRail":"transfer"}' # → { "success": true, "holdStatus": "challenge", "box": "0x…", … } # 2. Transfer USDC to `box`, then record it curl -s https://testnet-api.nibgate.xyz/hub/tips/hold \ -H 'content-type: application/json' \ -d '{"contentUrl":"https://ext.example/post","amount":"0.05","domain":"ext.example","paymentRail":"transfer","txHash":"0x…","walletAddress":"0xyou"}' # → { "success": true, "holdStatus": "held", "tip": { … } }

POST /hub/tips/refund

The payer proves wallet control with an EIP-191 personal_sign signature. The hub recovers the signer, sums that payer’s still-held tips for the domain, relays an on-chain refund, flips those rows to refunded, and writes a negative ledger row so tip totals net out.

curl -s https://testnet-api.nibgate.xyz/hub/tips/refund \ -H 'content-type: application/json' \ -d '{"domain":"ext.example","payer":"0xYou","message":"Nibgate tip refund…","signature":"0x…"}' # → { "success": true, "amount": 0.05, "refundTx": "0x…" }

The signature is a wallet-control proof, not an authorization to move funds anywhere else — a refund can only ever return USDC to the signing payer. There is no fee on a refund.

The on-chain holding box

Held funds live in a deterministic, no-key contract address derived per domain (CREATE2 from keccak256(domain)). The box has no EOA private key, but its factory owner/keeper authorizes release and refund. The Hub verifies creator ownership and payer identity offchain; the contracts trust the relayer’s recipient arguments. Held funds therefore depend on that authorization boundary. Full internals live on the holding contracts page.

TestnetMainnet
TipHoldingFactory0xf127a645d7c02a12e0a93b135f8acf9c3332e5180x3b25846c3332fcb8140e2ab60aad2b7fb401fe87
Owner0x796a…CD68 (team key)treasury 0x558e…9D12
Keeperrotated holding key (0xA0B9…894)rotated holding key (0xb518…6e5)
Held-tier fee (feeBps)500 (5%)500 (5%)
Gateway domain2626
  • The box address is predicted offchain with the same inputs (factory address + wallet init-code hash) the factory’s predict() uses, so payers can safely fund a box that has no code yet — the factory materializes the same address on first use.
  • Each domain’s box is deployed on first use (claim or refund). The first release or refund also pays deployment gas; subsequent operations reuse the box. Actual fees depend on the network and transaction. The mainnet keeper must stay funded or claims and refunds start failing.
  • Holds paid over the Circle Gateway rail land as Gateway ledger credit for the box first; the hub collects it on-chain (the box’s ERC-1271 self-withdrawal) before releasing or refunding. If the credit is still settling, claim/refund return 202 pending-settlement — retry shortly.

Fees

TipFeeWhy
Resolved, self-hosted member100 bps (1%)Processing only
Held → claimed (non-member)500 bps (5%)Resolution + custody + claim ops
Payer refund (unclaimed)0Funds never reached a creator

On a settled tip the payer’s transfer moves gross to the payee at payment time; protocolFee is analytic bookkeeping that mirrors the hosted fee wallet’s on-chain 99/1 split (hosted fee wallets divide later via distribute(); self-hosted creators simply keep the gross). On a claim, the box itself splits: fee = balance × feeBps / 10000 to the treasury, the rest to the creator, and each released row is stamped with that fee.

See Revenue model and Payments and receipts for how tips appear in analytics and the public ledger.

Creator: claiming held tips

When a creator verifies a site they can sweep every tip waiting in its box in one atomic transaction:

curl -s https://testnet-api.nibgate.xyz/hub/tips/claim \ -H 'content-type: application/json' \ -d '{"siteId":"<siteId>","token":"<verifyToken>"}' # → { "success": true, "releaseTx": "0x…", "feeBps": 500, "protocolFee": … }
  • Ownership is proven with the site’s verifyToken (same token as site verification).
  • The claim sweeps every held row matching the domain — rows keyed to the canonical domain or carrying a contentUrl on the site’s domain — then the keeper releases net to the creator and the held-tier cut to the treasury.
  • Claiming to a wallet other than the site’s owner wallet additionally requires a signed claimToken proving control of that wallet.
  • One verified wallet is bound per domain; a different wallet later goes to manual review, never auto-release (409 domain-claimed-by-other-wallet).
  • An empty claim returns { released: [], pending: 0 }. A Gateway credit that hasn’t settled returns 202 pending-settlement; a failed collection or on-chain revert returns 502 — nothing is marked released unless the chain call succeeds.

Payer: refunding held tips

If the creator never claims, the payer can take their money back:

# See what is waiting curl -s 'https://testnet-api.nibgate.xyz/hub/tips/held?domain=ext.example' # Request a refund (sign the message with the paying wallet) curl -s https://testnet-api.nibgate.xyz/hub/tips/refund \ -H 'content-type: application/json' \ -d '{"domain":"ext.example","payer":"0xYou","message":"…","signature":"0x…"}'

The refund is always full amount, no fee, and only touches tips still in held state. An optional amount caps the refund at that much (never above your held total); omit it to sweep everything. A Gateway credit that hasn’t settled returns 202 pending-settlement; no held rows for that payer/domain returns 404.

SDK

Browser (@nibgate/sdk/browser) — fails over to a hold automatically when no creator resolves:

import { tipContent, holdTipContent, refundTip } from '@nibgate/sdk/browser' await tipContent({ contentUrl, title, amount: '0.5', signer, hubApi }) // resolved → settled; else → held await holdTipContent({ contentUrl, amount: '0.5', signer, hubApi }) // explicit hold await refundTip({ domain, signer, hubApi }) // payer refund

Server (@nibgate/sdk/server) — build and relay the on-chain calls yourself:

import { holdingDeployment, buildHoldingRefund, submitHoldingRefund, buildHoldingRelease } from '@nibgate/sdk/server' const dep = holdingDeployment('mainnet') // or 'testnet' const refund = buildHoldingRefund({ domain, payer, amountUsdc, factoryAddress: dep.factoryAddress }) await submitHoldingRefund(refund, { privateKey, rpcUrl, chainId: dep.chainId })

React (@nibgate/wallet): useNibgateTip() returns { tip, refund, status, receipt }; NibgateTipCard / NibgateTipInline render the UI. Before signing, tip() reads the wallet’s onchain USDC balanceOf on the active network and refuses up front — naming the network, the needed amount, and the actual balance — instead of sending a transfer that would revert (a reverted transfer still burns gas, and gas on Arc is USDC). The transfer rail spends wallet USDC only: Gateway credit and other-network balances don’t count. The wallet extension detects whether the page’s creator is resolved and either settles or holds, and exposes a Refund action on held receipts in its activity detail.

Ledger, pending-tip checker, and analytics

Tips are first-class ledger rows (type: "tip"). Funded holds appear immediately with status: "held" and are pending, not completed-tip revenue. Refunds write a negative refunded row so totals net out. Filter with GET /hub/ledger?type=tips; use the public pending-tip checker or GET /hub/tips/held?domain=<domain> to look up waiting tips. Because funds flow at the payment layer, machine payers are recorded exactly like browser users.

The public Pending tip checker  lets anyone check a domain or page URL without a Nibgate account. The equivalent testnet page is testnet.nibgate.xyz/pending-tips ; each page only checks its own network. The API normalizes www but does not include subdomains when checking a parent domain. It returns the latest 100 rows, plus a total count and pending amount for all matched held tips.

External-page metadata is not guaranteed to be complete. The checker displays fields supplied by the tipper/extension and metadata recoverable from matching indexed content. JEV can enrich eligible indexed content; it is not a universal metadata or cover-image generator.

Trust model

  • Box custody: funds reside at a deterministic contract address with no EOA key. Factory owner/keeper permissions control release and refund.
  • Recipient authorization: the Hub checks domain ownership, payer identity and receipt state; contracts trust the recipient arguments supplied by the authorized factory caller.
  • Fees: a claim splits the current box balance under its immutable held-tier fee; refunds use the supplied payer and are capped by the available balance.
  • Pending outcomes: preserve the original transaction and reconcile an uncertain result before another relay. A database receipt and a chain transfer are separate observations.

Payment confirmation and safe retries

SDK 0.4.40 and wallet 0.4.31 support Arc mainnet (eip155:5042, https://api.nibgate.xyz) and Arc testnet (eip155:5042002, https://testnet-api.nibgate.xyz). Install @nibgate/sdk@latest and @nibgate/wallet@latest. Configure the application network and matching Hub together; an npm tag does not configure the network automatically.

A wallet transaction hash or Gateway signature means a proof was submitted, not that the Hub recorded a successful tip. A standalone SDK tip without a Hub verification response returns status: 'pending'. Only a successful Hub response confirms settled (resolved tip) or holdStatus: 'held' (funded hold).

On an interrupted response, keep the original proof and exact request fields, including the network, amount, payee and content metadata. Retry verification with that same proof; never send a second payment to repair a missing receipt. The matching completed proof returns HTTP 200 with replayed: true and its existing receipt, without another Tip row or another Gateway settlement. Reusing a proof with different request fields is rejected. Legacy proofs without the new verified binding fail closed.

HTTP 409 payment-proof-already-used means the proof is reserved or recorded with a different or unverifiable binding. HTTP 409 payment-verification-pending means its durable reservation has not completed. Stop automatic payment attempts; inspect the existing transaction/receipt and reconcile ambiguous settlement with the operator. Pending reservations are not automatically cleared or settled again. A transport or server error after submission is not evidence that no payment occurred. An unconfirmed direct-transfer receipt returns HTTP 402; retrying its read-only verification is safe. If a facilitator settlement is lost before database completion, the stored proof and transaction require reconciliation. Held-tip claim/refund relays have their own outcome checks.

Google wallet compatibility: wallet 0.4.31 checks already-authorized accounts before SIWE, closes the AppKit sheet before the embedded signature prompt, and configures Reown’s Arc RPC routes on both networks. This avoids overlapping dialogs and Magic iframe restrictions on direct Arc RPC hosts. Nibgate’s application RPC proxies remain read-only; wallet signing still requires user approval.

Last updated on