Skip to content

CreditGrant.apply

POST /{namespace}/credit-grants/apply

Apply spends Credit Grants against a finalizing Invoice, promotional first, then by priority and earliest expiry, and settles them through Stripe credit grants.

Mode
do
Event
CreditGrant.applied

Inputs

InputTypeRequiredDescription
invoiceInvoicerequiredThe Invoice being finalized.

Outputs

OutputTypeRequiredDescription
appliedmoneyrequiredThe total the grants paid toward the Invoice.
creditGrantslist of Credit GrantrequiredEach grant drawn, with its new remaining balance.

Effects

  • Emits CreditGrant.applied.
  • Performed by the Billing Specialist.
  • Two-way: it runs at once, in the try, send and do modes.
  • Pays only metered lines of the Startup’s own Offers; credits are never cash and never transfer.
  • At zero balance, the Offer’s atBound behavior applies: stop, overage through the Meter, or upgrade.

Refuses when

CheckErrorFixThen call
The key is valid, but its scopes do not allow this operation.forbiddenUse a key whose scopes cover the operation, or ask an owner of the namespace to grant them.CreditGrant.apply

When it waits

GateDefault
Decision classLow: two-way, nothing at stake
Delay windowNone: it runs once review passes.
LimitThe call Limit of the Permission it runs under.
Over the LimitIt waits pending for an Approval from the Founder. Approved, it runs; refused, it ends refused with limit-exceeded; unanswered by its deadline, it ends canceled.