Skip to content

CreditGrant.issue

POST /{namespace}/credit-grants/issue

Issue gives a Customer a paid or promotional Credit Grant that its metered calls draw down before anything is invoiced.

Mode
do
Event
CreditGrant.issued

Inputs

InputTypeRequiredDescription
customerCustomerrequiredThe Customer who receives it.
amountmoneyrequiredThe balance granted.
categorystringrequiredpaid for a balance the Customer bought; promotional for one given, which is never cash.
appliesToOfferThe metered Offer it pays for; every metered Offer of the Startup when absent.
expiresAtdatetimeWhen any remaining balance lapses; never, when absent.
priorityintegerOrder of use among grants; a lower number spends first.

Outputs

OutputTypeRequiredDescription
creditGrantCredit GrantrequiredThe new Credit Grant, its remaining balance equal to its amount.

Effects

  • Emits CreditGrant.issued.
  • Performed by the Billing Specialist.
  • Two-way: it runs at once, in the try, send and do modes.
  • Order.pay issues a paid grant on an Offer with credit; a promotional grant counts against the issuer’s Limit.
  • Mirrors the grant to Stripe, which applies it when the Invoice finalizes.

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.issue

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.