com.gigs.invoice.paid

  • Name
    object
    Type
    string
    required
    Description

    Type of object is always event.

  • Name
    id
    Type
    string
    required
    Description

    Unique identifier for the event.

    Example: evt_0SNlurA049MEWV5gNTcQ5A07h3Ol
  • Name
    data
    Type
    object
    PREVIEW
    required
    Description
    Invoices represent the charges due to a user for a given subscription period, including any relevant taxes and fees.
    • Name
      object
      Type
      string
      required
      Description

      Type of object is always invoice.

    • Name
      id
      Type
      string
      required
      Description

      Unique identifier for the invoice.

      Example: inv_0SNlurA049MEWV1QTRqvd18YuG25
    • Name
      discount
      Type
      object
      required
      Description
      The total discount applied.
    • Name
      fees
      Type
      array
      required
      Description

      The fees for the invoice.

    • Name
      lineItems
      Type
      array
      required
      Description

      The line items that make up the invoice.

    • Name
      payment
      Type
      nullable string
      required
      Description

      The unique identifier for the payment associated with the invoice, if any. Only present if the invoice has been paid using Gigs Payments.

      Example: pay_0SNlurA049MEWV2HRA0slWFuS8DV
    • Name
      period
      Type
      nullable object
      required
      Description
      The subscription period that this invoice relates to. It might not be present for new subscriptions if the period has not been defined yet.
    • Name
      reason
      Type
      string
      required
      Description

      The reason for the invoice. It can have one of the following values:

      • subscriptionCreation: The invoice is due to a new subscription.
      • subscriptionRenewal: The invoice is due to a subscription renewal.
      • other: The invoice is not related to a subscription but due an e.g. one-time addon order.
      Allowed values: other, subscriptionCreation, subscriptionRenewal
    • Name
      status
      Type
      string
      required
      Description

      The status of the invoice. It can have one of the following values:

      • draft: The invoice is still being edited.
      • finalized: The invoice can no longer be changed and is awaiting payment.
      • paid: The invoice was paid. This causes the associated resources to activated.
      • voided: The invoice was voided and no longer has any effect.
      Example: draft
      Allowed values: draft, finalized, paid, voided
    • Name
      subscription
      Type
      string
      required
      Description

      The unique identifier for the subscription that this invoice relates to.

      Example: sub_0SNlurA049MEWV2gSfSxi00xlPIi
    • Name
      subtotal
      Type
      object
      required
      Description
      The total amount before any discounts, taxes or fees are applied.
    • Name
      tax
      Type
      object
      required
      Description
      The total amount of taxes. This is the sum of the taxes of each line item.
    • Name
      total
      Type
      object
      required
      Description
      The total amount after all discounts, taxes and fees are applied.
    • Name
      createdAt
      Type
      string
      required
      Description

      Time when the invoice was created.

      Example: 2024-01-09T15:00:51Z
    • Name
      finalizedAt
      Type
      nullable string
      required
      Description

      Time when the invoice was finalized and could no longer be changed.

      Example: 2024-02-01T11:12:13Z
  • Name
    datacontenttype
    Type
    string
    required
    Description

    The RFC 2046 content-type.

    Example: application/json
    Default: application/json
  • Name
    project
    Type
    string
    required
    Description

    Unique identifier for the project where the event occurred.

    Example: gigs
  • Name
    source
    Type
    string
    required
    Description

    URI identifying the event source.

    Example: https://api.gigs.com
    Default: https://api.gigs.com
  • Name
    specversion
    Type
    string
    required
    Description

    The CloudEvents spec version.

    Example: 1.0
    Default: 1.0
  • Name
    time
    Type
    string
    required
    Description

    Time when the event occurred.

    Example: 2022-03-16T14:12:42Z
  • Name
    type
    Type
    string
    required
    Description

    Type is always com.gigs.invoice.paid.

  • Name
    version
    Type
    string
    required
    Description

    API version used to serialize the data and the event itself.

    Default: 2024-08-29

Example

{
  "object": "event",
  "id": "evt_0SNlurA049MEWV5gNTcQ5A07h3Ol",
  "data": {
    "object": "invoice",
    "id": "inv_0SNlurA049MEWV1QTRqvd18YuG25",
    "discount": {
      "amount": 999,
      "currency": "USD"
    },
    "payment": "pay_0SNlurA049MEWV2HRA0slWFuS8DV",
    "period": {
      "number": 1,
      "start": "2021-01-21T19:32:13Z",
      "end": "2021-02-20T19:38:34Z"
    },
    "reason": "other",
    "status": "draft",
    "subscription": "sub_0SNlurA049MEWV2gSfSxi00xlPIi",
    "subtotal": {
      "amount": 999,
      "currency": "USD"
    },
    "tax": {
      "amount": 999,
      "currency": "USD"
    },
    "total": {
      "amount": 999,
      "currency": "USD"
    },
    "createdAt": "2024-01-09T15:00:51Z",
    "finalizedAt": "2024-02-01T11:12:13Z"
  },
  "datacontenttype": "application/json",
  "project": "gigs",
  "source": "https://api.gigs.com",
  "specversion": "1.0",
  "time": "2022-03-16T14:12:42Z",
  "type": "com.gigs.invoice.paid",
  "version": "2024-08-29"
}