Skip to main content

creditOrgWallet

OPERATOR ONLY. Credits an organization wallet without a payment provider, for seeding a test environment or making an operator adjustment, and records it in the wallet ledger as an "admin_credit" transaction. Use this instead of writing to org_wallets by hand: it creates the wallet if absent, repairs a missing wallet id, and moves the balance and the ledger row together in one transaction. Pass a referenceId to make retries idempotent. SIDE EFFECT: re-evaluates the runtime gate for every shared app in the org, so a credit that clears an insufficient_funds denial lifts it immediately instead of leaving the app refusing clients.

creditOrgWallet(
orgId: BigInt!
amountCents: BigInt!
reason: String!
referenceId: String
): WalletTransaction!

Arguments

creditOrgWallet.orgId ● BigInt! non-null scalar

Organization whose wallet is credited.

creditOrgWallet.amountCents ● BigInt! non-null scalar

Amount to add, in minor units (cents) of the wallet currency, as a BigInt decimal string. Must be positive — this mutation only credits.

creditOrgWallet.reason ● String! non-null scalar

Why the credit is being made. Stored as the ledger description, so write it for whoever reads the ledger later rather than for yourself.

creditOrgWallet.referenceId ● String scalar

Optional caller-supplied key. Replaying the same referenceId returns the original transaction instead of crediting twice.

Type

WalletTransaction object