Credits & account snapshot
Credits are a consumptive, single-issuer, fiat-denominated prepayment. Hold at submit, settle on metered usage, refund the remainder.
Check your balance
GET /v1/credits/balance:
const b = await client.getCreditBalance();
// { balance, held, available, rebateAccrued, currency: "credits", usdPerCredit }
held is the sum of all in-flight submission holds; available = balance - held.
Read the rate card
GET /v1/rate-card returns live pricing + the surge multiplier, tenant-scoped. jobTypes is an array — locate a type with .find().
const rc = await client.getRateCard();
const ats = rc.jobTypes.find((j) => j.jobType === "ats.application");
const std = ats?.tiers.standard; // { base, min, max, tierMultiplier, weights }
console.log(rc.surgeMultiplier, rc.usdPerCredit, std?.base);
The credit lifecycle
- Hold.
POST /v1/submissionsholdsquote.maxagainst your balance. - Settle. On completion the server computes the actual charge from metered resource usage (node-seconds, CPU, memory, bandwidth, actions, …) using the published pricing function.
- Refund. The unused remainder (
max − actual) is returned to your balance. Thesubmission.completedwebhook carriesactualCredits+refundedCredits.
Pricing function and the ats.application calibration: docs/CREDIT-SYSTEM.md §4–§5.
Account snapshot (one read pass)
The typical dashboard pulls rate card + balance together, and one submission on demand. All three are safe GETs the SDK retries automatically.
const [rateCard, balance] = await Promise.all([
client.getRateCard(),
client.getCreditBalance(),
]);
const detail = await client.getSubmission(submissionId); // optional
Runnable: examples/account-snapshot.ts.
Top up (fiat — the GA rail)
Fiat is the customer payment rail (ADR-046). During the pilot beta, top-ups in both environments are coordinated with GoFundNode ops (ops@gofundnode.com): you pay in fiat and ops grants the credits to your tenant — the grant endpoint (POST /v1/credits/purchase) is ops-only and is not callable by tenants. Sandbox (staging) tenants start with an automatic signup grant, so first submissions on staging need no top-up. Self-serve checkout arrives with general availability; until then top-ups remain ops-coordinated. The credits.low_balance webhook fires automatically below your threshold (default 1000). See Onboarding.
Inbound Solana Pay USDC — a preserved continuity exception
createPurchaseIntent / getPurchaseIntent / waitForPurchaseIntent flow is a preserved payment-continuity exception: inbound customer USDC reconciles to fiat-denominated credits. It is off unless explicitly enabled (otherwise 409 solana_disabled) and must not be presented as the primary rail. There is no crypto operator payout, token, wallet, self-custody, or stored value anywhere in the product.// Only when the continuity rail is enabled for your deployment:
const intent = await client.createPurchaseIntent({ credits: 10_000, token: "USDC" });
// render intent.solanaPayUrl as a QR / hand to a wallet (the SDK does NOT sign)
const confirmed = await client.waitForPurchaseIntent(intent.reference);
// throws GoFundNodePaymentIntentError on expired/failed
docs/V1-API.md §2.4–§2.8, docs/CREDIT-SYSTEM.md, and ADRs 0046 / 0047 (all in the repository).