Skip to main content

Credit and later draws

mode=credit establishes a payer's authorization for a spender to draw funds. Credit is an allowance, not received money, a deposit or locked funds, and does not guarantee sufficient funds for future draws. Pure credit success cannot release an API operation that requires an actual payment; every later draw needs its own execution and receipt assessment.

Terms and confirmation​

FieldMeaning
spenderAuthorized merchant's full Invisi address; resolve and check the identity before execution
availableCreditInitial finite allowance, reduced by draws
unlimitedRemoves the finite allowance constraint while retaining other limits; true requires availableCredit="0"
singleLimitPer-draw cap; "0" disables this limit
dailyLimit / monthlyLimitUTC calendar day/month aggregate caps; "0" disables each limit
credit.expiresAtLong-term authorization expiry, covering the Request execution deadline
initialPaymentOptional creation with initial payment; amount is the merchant's net receipt

Amounts use base-unit strings. Finite initial availableCredit must be positive. Single, daily and monthly limits fit uint126; availableCredit fits uint128. Daily and monthly limits follow UTC calendar boundaries rather than a rolling subscription period starting on authorization day.

Confirmation adds operation=create, network, protocolAddress, tokenAddress and creditSharedKey to CreditRequest.credit, freezing all terms. This is a partial pure-credit terms object, not a complete option or Request; spender is a placeholder:

{
"credit": {
"spender": "0i_EXAMPLE_MERCHANT_RECEIVING_ADDRESS",
"availableCredit": "1000000000",
"unlimited": false,
"singleLimit": "10000000",
"dailyLimit": "50000000",
"monthlyLimit": "300000000",
"expiresAt": "2027-11-20T08:00:00Z"
}
}

Wallet execution and evidence binding​

The wallet must use the exact creditSharedKey returned in the authenticated CreditRequest without generating or deriving a replacement. Its SDK must support an explicit shared key; verify the selected version's capability first. This key appears only in the protected Request, never Session options, entry URLs, logs or receipts, and does not replace the owner's chain authorization.

The wallet prepares the remaining state, proof and encrypted deliveries and executes. Facilitator decrypts the spender delivery, matches the shared key, recomputes the commitment and verifies all terms, owner and original revocation position. It checks the canonical creation receipt, membership, consumption, revocation bitmap and expiry at one finalized snapshot. Ordinary Note lookup cannot verify a Credit.

For pure credit, an initial state consumed, updated, revoked or expired before first redemption cannot yield an active receipt. A receipt's creditId is a stable logical identifier; commitments change with later states. creditStatus and verificationBlock describe the original verification snapshot, not current allowance. Later draws, updates and revocation neither repeat creation Checkout redemption nor rewrite its historical receipt.

Optional creation with initial payment​

Publish credit.initialPayment only when the service, deployment, wallet and broadcast path support it. Unsupported clients must reject execution rather than silently create pure credit. The option and Request must contain the same initial payment amount.

The payment goes to the same spender on the same network, Core and token. Before the owner signs, determine the net amount, actual fee and total debit: grossAmount = amount + feeAmount. Gross amount consumes the allowance and limits; the merchant Note contains the net amount. The owner's combined authorization covers this operation without an additional merchant signature endpoint.

The service must verify credit creation and the initial payment Note in the same successful transaction before redeeming once. receipt.initialPayment contains noteCommitment, grossAmount, netAmount, feeAmount and feeRecipient. An initial payment that exactly exhausts a finite grant can yield creditStatus=depleted. A later independent draw cannot substitute for missing initial-payment evidence.

See Facilitator for merchant draw and custody responsibilities, and recovery for unknown transaction outcomes and late authorization facts.