Skip to content

CreditGrant.issued

Emitted each time a Credit Grant is issued.

CreditGrant.issue emits CreditGrant.issued when it completes on a Credit Grant.

PropertyValue
Emitted byCreditGrant.issue
NounCredit Grant
WakesNone.

Payload

Each delivery is an Event record. data holds what CreditGrant.issue returns.

FieldTypeRequiredDescription
namestringrequiredCreditGrant.issued.
atdatetimerequiredWhen it happened.
seqintegerIts position in the namespace, one more than the Event before; any seq is a cursor into the history.
datajsonrequiredThe Thing as the Action left it.
data.creditGrantCredit GrantrequiredThe new Credit Grant, its remaining balance equal to its amount.
data.creditGrant.amountmoneyrequiredThe balance granted.
data.creditGrant.categorystringrequiredpaid (bought through an Order, deferred revenue until spent) or promotional (given; never cash).
data.creditGrant.priorityintegerOrder of use when several grants apply: a lower number spends first, then the earliest expiry.
data.creditGrant.expiresAtdatetimeWhen any remaining balance lapses. Absent means it never lapses.
data.creditGrant.appliesToOfferThe metered Offer the balance pays for. Absent means every metered Offer of the Startup.
data.creditGrant.remainingmoneyThe unspent balance, debited once after each metered call and checked as a Limit before the next.

Example

JSON
{
  "$id": "https://api.sb/tutorloop.com/events/event_1",
  "$type": "Event",
  "name": "CreditGrant.issued",
  "at": "2026-10-22T12:00:00Z",
  "data": {
    "creditGrant": {
      "$id": "https://api.sb/tutorloop.com/credit-grants/credit_grant_1",
      "$type": "CreditGrant",
      "amount": {
        "amount": 60,
        "currency": "USD"
      },
      "category": "paid",
      "priority": 1,
      "expiresAt": "2026-10-22T12:00:00Z",
      "appliesTo": "offer_1",
      "remaining": {
        "amount": 60,
        "currency": "USD"
      }
    }
  },
  "seq": 1
}