# Subscription order created

`POST subscription-created`

> This is a subset of the full specification, limited to the `POST subscription-created` operation.
>
> You can find the full specification here: /_bundle/docs/dev-docs/api/index.yaml

```yaml
openapi: 3.1.1
info:
  version: latest
  title: Core APIs
  contact:
    name: Rebilly API Support
    url: https://www.rebilly.com/contact/
    email: integrations@rebilly.com
  license:
    name: Rebilly
    url: https://www.rebilly.com/api-license/
  termsOfService: https://www.rebilly.com/terms-of-use/
  x-logo:
    url: https://rebilly-core.redoc.ly/rb_apiLogo.svg
    backgroundColor: '#0044d4'
  description: This is a subset of the full specification, limited to the `POST subscription-created` operation. Components more than 3 `$ref` hops away are not included.
  x-metadata:
    description: The most common APIs used to automate common workflows.
    redocly_category: API Reference
servers:
  - url: https://api-sandbox.rebilly.com/organizations/{organizationId}
    description: Sandbox server
    variables:
      organizationId:
        default: '{organizationId}'
        description: |-
          Unique organization identifier.
          An organization is an entity that represents a company.
          For more information, see [Obtain an organization ID](https://www.rebilly.com/docs/settings/organizations-and-websites/#obtain-your-organization-id-and-website-id).
  - url: https://api.rebilly.com/organizations/{organizationId}
    description: Live server
    variables:
      organizationId:
        default: '{organizationId}'
        description: |-
          Unique organization identifier.
          An organization is an entity that represents a company.
          For more information, see [Obtain an organization ID](https://www.rebilly.com/docs/settings/organizations-and-websites/#obtain-your-organization-id-and-website-id).
security:
  - SecretApiKey: []
  - JWT: []
tags:
  - name: Orders (legacy)
    description: |-
      Use these operations to manage customer orders.

      This is the legacy order model.
      If you are new to Rebilly, use [these order operations](#tag/orders).
      Organizations that use the current order model cannot create legacy orders.
      For these organizations, the operations that create a legacy order return a validation error.

      For information on the legacy order model, and how to upgrade to the current order model, see [Legacy orders model](https://www.rebilly.com/docs/glossary#legacy-orders-model).

      An order is a customer's request to purchase items.
      It can contain subscription and one-time sale items.
      When an order contains one or more subscription items, it is a subscription order.

      An order generates an invoice.
      A subscription order generates an invoice for each service period.
      For more information, see [Orders](https://www.rebilly.com/docs/dev-docs/concepts/#orders).
x-tagGroups:
  - name: Orders & Invoices
    tags:
      - Orders (legacy)
paths: {}
webhooks:
  subscription-created:
    post:
      summary: Subscription order created
      operationId: subscription-created
      x-products:
        - Core
      tags:
        - Orders (legacy)
      requestBody:
        $ref: '#/components/requestBodies/SubscriptionWebhook'
      responses:
        2xx:
          description: Returns any 2xx status to indicate that data is received.
components:
  securitySchemes:
    JWT:
      description: |-
        JWT is a short lifetime token that can be assigned a specific expiration time.

        Usage format: `Bearer <JWT>`.
      type: http
      scheme: bearer
      bearerFormat: JWT
    SecretApiKey:
      description: |-
        Never share your secret keys.
        Keep them guarded and secure.

        Use your secret API key only to make requests from the server side.
        To authenticate, provide your secret key in the request header.
      name: REB-APIKEY
      type: apiKey
      in: header
  schemas:
    Subscription:
      type: object
      required:
        - orderType
        - customerId
        - websiteId
        - items
      properties:
        id:
          type: string
          description: ID of the order.
          readOnly: true
          maxLength: 50
          example: sub_01HRF27SATGE4Z6PBJE6PD8328
        orderType:
          description: |-
            Specifies the type of order.
            An order may be a subscription or a one-time purchase.

            > **Note:** The order type cannot be changed after creation.
          type: string
          x-basic: true
          enum:
            - subscription-order
        customerId:
          $ref: '#/components/schemas/CustomerId'
        renewalReminderTime:
          description: Date and time when the renewal reminder event triggers.
          type:
            - string
            - 'null'
          format: date-time
          readOnly: true
        renewalReminderNumber:
          description: Number of triggered renewal reminder events.
          type:
            - integer
            - 'null'
          readOnly: true
        abandonReminderTime:
          description: Date and time when the abandon order reminder event triggers.
          type:
            - string
            - 'null'
          format: date-time
          readOnly: true
        abandonReminderNumber:
          description: Number of abandon order reminder events that are triggered.
          type:
            - integer
            - 'null'
          readOnly: true
        organizationId:
          readOnly: true
          allOf:
            - $ref: '#/components/schemas/OrganizationId'
        status:
          description: |-
            Status of the subscription service.
            A subscription starts in the `pending` status, and becomes `active` when the service period begins.
          type: string
          readOnly: true
          enum:
            - pending
            - active
            - abandoned
            - canceled
            - churned
            - paused
            - voided
            - completed
            - trial-ended
        inTrial:
          description: Specifies if the subscription is currently in a trial period.
          type: boolean
          readOnly: true
        trial:
          type: object
          description: |-
            Details of the trial.
            To use plan defaults, omit the `trial` key or set this value to `null`.
          properties:
            enabled:
              description: |-
                Specifies if there is a trial for this order.
                Plans without trial prices are free trials.
                If the order is active, all order items are in a trial, and `isTrialOnly` is `false`, setting this value to `false` ends the trial immediately.
                If the request that sets this value to `false` also changes `renewalTime`, the order renews at that time.
                If the request does not change `renewalTime`, the order renews immediately.
                In the response, this field remains `true`, and `endTime` contains the date and time when the trial ended.
                If only some items of an active order are in a trial, changing this value from `true` to `false` returns a 409 error.
              type: boolean
            endTime:
              description: |-
                Time and date when the trial ends.
                If the order churns during the trial, this value is the time when the order churned.
                If a trial is enabled on this subscription, a value must be provided.

                If the specified trial end time is in the past, the current time is used.
              type:
                - string
                - 'null'
              format: date-time
        isTrialOnly:
          description: |-
            Specifies if a subscription ends after a trial period.
            If this value is `true`, recurring settings are ignored.
          type: boolean
          default: false
        trialConversionTime:
          description: |-
            Date and time when the subscription had a trial conversion.
            Trial conversion occurs when the first successful payment is made after a trial period.
          type:
            - string
            - 'null'
          format: date-time
          readOnly: true
        invoiceTimeShift:
          description: |-
            Shifts issue time and due time of invoices for this subscription.

            This setting overrides plan settings.
            To use plan settings, set this value to `null`.

            To use multiple plans in one subscription,
            all plans must have the same billing period,
            this property enables the customer to subscribe to different plans.
          $ref: '#/components/schemas/InvoiceTimeShift'
        autopay:
          description: |-
            Specifies if payment attempts are made automatically.
            If autopay is enabled, the payment is retrieved from the customer on the renewal date using the payment instrument that is set at `paymentInstrumentId`,
            or the default payment instrument on the subscription.
          type: boolean
          default: true
        startTime:
          description: |-
            Date and time when the subscription starts.
            If this value is `null`, the current time is used.
            This value cannot be more than one service period in the past.
          type:
            - string
            - 'null'
          x-sortable: true
          x-basic: true
          example: null
          default: null
          format: date-time
        churnTime:
          description: Date and time when the subscription is deactivated.
          x-sortable: true
          type:
            - string
            - 'null'
          format: date-time
          readOnly: true
        renewalTime:
          description: |-
            Date and time when the subscription renews.
            If the order has no trial, the first service period ends at the date and time specified in the request that creates the order.
            If the order has a trial, the specified date and time are ignored, and the subscription renews when the trial ends.
            If the order is in a trial, the date and time specified in a request that updates the order are ignored, unless that request also sets `trial.enabled` to `false`.
          type:
            - string
            - 'null'
          x-sortable: true
          x-basic: true
          format: date-time
        currentPeriodStart:
          description: Date and time of the current service period start.
          type: string
          format: date-time
          readOnly: true
        currentPeriodEnd:
          description: Date and time of the current service period end.
          type: string
          format: date-time
          readOnly: true
        rebillNumber:
          description: Current billing period number.
          type:
            - integer
            - 'null'
          readOnly: true
          x-sortable: true
        lineItems:
          description: Subscription line items which queue until the next renewal, or interim, invoice is issued for the subscription.
          readOnly: true
          type: array
          deprecated: true
          items:
            type: object
            description: |-
              Invoice line item.
              Use the `isInterim` property of upcoming invoice items instead.
            deprecated: true
            properties:
              type:
                description: Type of invoice line item.
                type: string
                enum:
                  - debit
                  - credit
              description:
                description: Description of the line item.
                type: string
                maxLength: 1000
              unitPriceAmount:
                description: Unit price of the line item.
                type: number
                format: double
                example: 49.95
              unitPriceCurrency:
                $ref: '#/components/schemas/CurrencyCode'
              quantity:
                description: Quantity of the line item.
                type: integer
                example: 1
              periodStartTime:
                description: Date and time when the service period begins for this item.
                type: string
                format: date-time
              periodEndTime:
                description: Date and time when the service period ends for this item.
                type: string
                format: date-time
              createdTime:
                $ref: '#/components/schemas/CreatedTime'
              updatedTime:
                $ref: '#/components/schemas/UpdatedTime'
        lineItemSubtotal:
          type: object
          readOnly: true
          deprecated: true
          description: |-
            Subtotal of line items in this subscription (signed value).
            If credits exceed debits, this value is a negative number.
          properties:
            currency:
              $ref: '#/components/schemas/CurrencyCode'
            amount:
              type: number
              x-type: Money
              x-sortable: true
              description: Amount of the subtotal.
              format: double
              example: 49.95
        mrr:
          description: Monthly recurring revenue of the order.
          type: number
          x-type: Money
          x-sortable: true
          format: double
          readOnly: true
          example: 49.95
        paymentInstrumentId:
          type:
            - string
            - 'null'
          description: |-
            ID of the payment instrument to use for autopay.
            If this value is not provided, or if the payment instrument is inactive,
            the customer's default payment instrument is used.
          maxLength: 50
          example: inst_0YVB8KPKNXCBR9EDX7JHSED75N
        billingStatus:
          description: |-
            Billing status of the most recent invoice.
            This value is used to determine whether to change the service status of the service,
            such as suspending the service.
          type: string
          readOnly: true
          enum:
            - draft
            - unpaid
            - past-due
            - abandoned
            - paid
            - voided
            - refunded
            - disputed
            - partially-refunded
            - partially-paid
        websiteId:
          type: string
          description: |-
            ID of the website.
            A website is where an organization obtains a customer.
            For more information, see [Obtain an organization ID and website ID](https://www.rebilly.com/docs/settings/organizations-and-websites/#obtain-your-organization-id-and-website-id).

            > **Note:** The ID of the website cannot be changed after creation.
          maxLength: 50
          example: web_0YV7DE4Z26DQSA1AC92FBJ7SEG
          x-sortable: true
          x-basic: true
        currency:
          description: Currency of the order.
          readOnly: true
          $ref: '#/components/schemas/CurrencyCode'
        initialInvoiceId:
          description: ID of the initial invoice.
          readOnly: true
          type:
            - string
            - 'null'
          maxLength: 50
          example: in_0YVF9605RKC62BP14NE2R7V2XT
        recentInvoiceId:
          description: |-
            ID of the most recently issued invoice.
            The invoice might not be `paid` yet.
          readOnly: true
          type:
            - string
            - 'null'
          maxLength: 50
          example: in_0YVF9605RKC62BP14NE2R7V2XT
        items:
          description: Details of items in the order.
          type: array
          minItems: 1
          items:
            $ref: '#/components/schemas/SubscriptionOrOneTimeSaleItem'
        deliveryAddress:
          description: |-
            Delivery address of the order.
            Changes to the delivery address apply to the upcoming invoice and to invoices created after the change.
            Issued invoices are not updated unless the order is `pending`.
            To change the delivery address on an unpaid, past-due, or partially paid invoice, use the [upsert an invoice API operation](https://www.rebilly.com/catalog/all/invoices/putinvoice#invoices/putinvoice/t=request&path=deliveryaddress).
          oneOf:
            - $ref: '#/components/schemas/ContactObject'
            - type: 'null'
        billingAddress:
          description: |-
            Billing address of the order.
            Changes to the billing address apply to the upcoming invoice and to invoices created after the change.
            Issued invoices are not updated unless the order is `pending`.
            To change the billing address on an issued invoice that has no payment attempts or applied credits, use the [upsert an invoice API operation](https://www.rebilly.com/catalog/all/invoices/putinvoice#invoices/putinvoice/t=request&path=billingaddress).
          oneOf:
            - $ref: '#/components/schemas/ContactObject'
            - type: 'null'
        activationTime:
          description: Date and time when the order is activated.
          x-sortable: true
          type:
            - string
            - 'null'
          format: date-time
          readOnly: true
        voidTime:
          description: Date and time when the order is voided.
          type:
            - string
            - 'null'
          format: date-time
          readOnly: true
        abandonTime:
          type:
            - string
            - 'null'
          description: |-
            Date and time when the pending order is automatically abandoned.
            If this value is not passed during order creation,
            a [pending order TTL](https://www.rebilly.com/catalog/all/organizations/patchorganization#organizations/patchorganization/t=request&path=settings/billing/pendingorderttl) setting is used to calculate the value.
          format: date-time
        delinquencyPeriod:
          type:
            - string
            - 'null'
          description: |-
            Length of time, in ISO-8601 durations format,
            which is added to the due time of the order when setting the delinquency time for all related invoices.
            When the delinquency time of an invoice is reached, the order is automatically canceled.

            - If the `delinquencyPeriod` value is `null`, the order does not change state and remains active.
              You must explicitly configure the delinquency period to enable automatic cancellation of unpaid orders.
            - If you add a delinquency period to an active order, it is applied to all new invoices created for the order. It is not applied to the unpaid and past-due invoices. To apply a delinquency period to unpaid and past-due invoices, set the `delinquencyTime` parameter using the [upsert an invoice API operation](https://www.rebilly.com/catalog/all/invoices/putinvoice#invoices/putinvoice/t=request&path=delinquencytime).

            If this value is not passed during order creation,
            an [order delinquency period](https://www.rebilly.com/catalog/all/organizations/patchorganization#organizations/patchorganization/t=request&path=settings/billing/orderdelinquencyperiod) setting is used to calculate the value.
          example: P7D
          default: null
        couponIds:
          type:
            - array
            - 'null'
          description: |-
            List of coupons to redeem on the customer and restrict to this order.

            For more information, see [Coupons](https://www.rebilly.com/docs/settings/coupons-and-discounts/).

            This parameter uses the following logic:

            - If this parameter is not supplied, applied coupons are not changed.
            - If an empty array is supplied, all applied coupon redemptions are canceled.
            - If a list of coupons is supplied, unapplied coupons in the list are applied.
              Coupons that have already been applied do not change state.
              Applied coupons that are not supplied in list are canceled.

            If the list of applied coupons on a pending order is changed by this parameter during an order update, the invoice for the order is reissued.
          writeOnly: true
          items:
            type: string
            description: ID of the coupon.
        poNumber:
          description: Purchase order number displayed on the issued invoices.
          type:
            - string
            - 'null'
          example: PO123456
        sandboxRetention:
          $ref: '#/components/schemas/SandboxRetention'
        shipping:
          description: |-
            Shipping settings of the order.
            Changes to shipping apply to the upcoming invoice and to invoices created after the change.
            Issued invoices are not updated unless the order is `pending`.
            To change shipping on an unpaid, past-due, or partially paid invoice, use the [upsert an invoice API operation](https://www.rebilly.com/catalog/all/invoices/putinvoice#invoices/putinvoice/t=request&path=shipping).
          $ref: '#/components/schemas/Shipping'
        notes:
          description: Notes for the customer displayed on the order invoice.
          type: string
        canceledTime:
          description: Date and time when a subscription is canceled.
          type:
            - string
            - 'null'
          format: date-time
          readOnly: true
        canceledBy:
          description: Specifies who initiated the cancellation.
          type:
            - string
            - 'null'
          readOnly: true
          enum:
            - merchant
            - customer
            - rebilly
            - null
        cancelCategory:
          description: |-
            Category of the cancellation.

            The `sandbox-retention` value is set only in the sandbox environment when a recurring order is canceled 90 days after creation.
          type:
            - string
            - 'null'
          readOnly: true
          enum:
            - billing-failure
            - delinquency
            - did-not-use
            - did-not-want
            - missing-features
            - bugs-or-problems
            - do-not-remember
            - risk-warning
            - contract-expired
            - too-expensive
            - never-started
            - switched-plan
            - organization-deactivated
            - sandbox-retention
            - other
            - null
        cancelDescription:
          description: Description of the cancellation reason in free form.
          type:
            - string
            - 'null'
          readOnly: true
          maxLength: 255
        revision:
          description: |-
            Number of times the order data has been modified.

            The revision is useful when analyzing webhook data to determine if the
            change takes precedence over the current representation.
          type: integer
          readOnly: true
        riskMetadata:
          description: |-
            Risk metadata.
            If this value is `null`, this field uses risk metadata that is captured when creating the payment token.
          oneOf:
            - $ref: '#/components/schemas/RiskMetadata'
            - type: 'null'
        billingPortalToken:
          description: |-
            Customer JWT to access a billing portal.
            This field is presented only if a billing portal exists.
            This is an experimental field and can be changed or removed in the future.
          type:
            - string
            - 'null'
          readOnly: true
        customFields:
          $ref: '#/components/schemas/ResourceCustomFields'
        createdTime:
          $ref: '#/components/schemas/CreatedTime'
        updatedTime:
          $ref: '#/components/schemas/UpdatedTime'
        _links:
          type: array
          description: Related links.
          readOnly: true
          items:
            type: object
            properties:
              href:
                description: Link URL.
                type: string
              rel:
                description: Type of link.
                type: string
                enum:
                  - self
                  - website
                  - customer
                  - initialInvoice
                  - recentInvoice
                  - approvalUrl
                  - attachments
                  - leadSource
        _embedded:
          type: object
          description: Embedded objects that are requested by the `expand` query parameter.
          readOnly: true
          properties:
            recentInvoice:
              type: object
            initialInvoice:
              type: object
            customer:
              type: object
            website:
              type: object
            leadSource:
              type: object
            shippingRate:
              type: object
            paymentInstrument:
              type: object
            upcomingInvoice:
              type: object
    OneTimeSale:
      type: object
      required:
        - orderType
        - customerId
        - websiteId
        - items
      properties:
        id:
          type: string
          description: ID of the one-time sale.
          readOnly: true
          maxLength: 50
          example: ots_01HRF27SATGE4Z6PBJE6PD8328
        orderType:
          description: |-
            Specifies the type of order.
            An order may be a subscription or a one-time purchase.
          type: string
          x-basic: true
          enum:
            - one-time-order
        customerId:
          $ref: '#/components/schemas/CustomerId'
        organizationId:
          deprecated: true
          readOnly: true
          allOf:
            - $ref: '#/components/schemas/OrganizationId'
        status:
          description: Status of the one-time order.
          type: string
          readOnly: true
          enum:
            - pending
            - abandoned
            - completed
            - canceled
        billingStatus:
          description: |-
            Billing status of the most recent invoice.
            This value is used to determine whether to change the service status of the service,
            such as suspending the service.
          type: string
          readOnly: true
          enum:
            - draft
            - unpaid
            - past-due
            - abandoned
            - paid
            - voided
            - refunded
            - disputed
            - partially-refunded
            - partially-paid
        websiteId:
          x-sortable: true
          x-basic: true
          allOf:
            - $ref: '#/components/schemas/WebsiteId'
        currency:
          description: Currency of the order.
          readOnly: true
          $ref: '#/components/schemas/CurrencyCode'
        initialInvoiceId:
          description: ID of the initial invoice (`null` for one-time orders).
          readOnly: true
          type:
            - string
            - 'null'
          maxLength: 50
          example: in_0YVF9605RKC62BP14NE2R7V2XT
        recentInvoiceId:
          description: |-
            ID of the most recently issued invoice.
            The invoice might not be `paid` yet.
          readOnly: true
          type:
            - string
            - 'null'
          maxLength: 50
          example: in_0YVF9605RKC62BP14NE2R7V2XT
        items:
          description: Details of items in the order.
          type: array
          minItems: 1
          items:
            $ref: '#/components/schemas/SubscriptionOrOneTimeSaleItem'
        deliveryAddress:
          description: Delivery address of the order.
          oneOf:
            - $ref: '#/components/schemas/ContactObject'
            - type: 'null'
        billingAddress:
          description: Billing address of the order.
          oneOf:
            - $ref: '#/components/schemas/ContactObject'
            - type: 'null'
        activationTime:
          description: Date and time when the order is activated.
          x-sortable: true
          type:
            - string
            - 'null'
          format: date-time
          readOnly: true
        voidTime:
          description: Date and time when the order is voided.
          type:
            - string
            - 'null'
          format: date-time
          readOnly: true
        abandonTime:
          type:
            - string
            - 'null'
          description: |-
            Date and time when the pending order is automatically abandoned.
            If this value is not passed during order creation,
            a [pending order TTL](https://www.rebilly.com/catalog/all/organizations/patchorganization#organizations/patchorganization/t=request&path=settings/billing/pendingorderttl) setting is used to calculate the value.
          format: date-time
        couponIds:
          type:
            - array
            - 'null'
          description: |-
            List of coupons to redeem on the customer and restrict to this order.

            For more information, see [Coupons](https://www.rebilly.com/docs/settings/coupons-and-discounts/).

            This parameter uses the following logic:

            - If this parameter is not supplied, applied coupons are not changed.
            - If an empty array is supplied, all applied coupon redemptions are canceled.
            - If a list of coupons is supplied, unapplied coupons in the list are applied.
              Coupons that have already been applied do not change state.
              Applied coupons that are not supplied in list are canceled.

            If the list of applied coupons on a pending order is changed by this parameter during an order update, the invoice for the order is reissued.
          writeOnly: true
          items:
            type: string
            description: ID of the coupon.
        poNumber:
          description: Purchase order number displayed on the issued invoices.
          type:
            - string
            - 'null'
          example: PO123456
        shipping:
          $ref: '#/components/schemas/Shipping'
        notes:
          description: Notes for the customer displayed on the order invoice.
          type: string
        revision:
          description: |-
            Number of times the order data has been modified.

            The revision is useful when analyzing webhook data to determine if the
            change takes precedence over the current representation.
          type: integer
          readOnly: true
        riskMetadata:
          description: |-
            Risk metadata.
            If this value is `null`, this field uses risk metadata that is captured when creating the payment token.
          oneOf:
            - $ref: '#/components/schemas/RiskMetadata'
            - type: 'null'
        customFields:
          $ref: '#/components/schemas/ResourceCustomFields'
        createdTime:
          $ref: '#/components/schemas/CreatedTime'
        updatedTime:
          $ref: '#/components/schemas/UpdatedTime'
        _links:
          type: array
          description: Related links.
          readOnly: true
          items:
            type: object
            properties:
              href:
                description: Link URL.
                type: string
              rel:
                description: Type of link.
                type: string
                enum:
                  - self
                  - website
                  - customer
                  - initialInvoice
                  - recentInvoice
                  - approvalUrl
                  - attachments
                  - leadSource
        _embedded:
          type: object
          description: Embedded objects that are requested by the `expand` query parameter.
          readOnly: true
          properties:
            recentInvoice:
              type: object
            customer:
              type: object
            website:
              type: object
            leadSource:
              type: object
            shippingRate:
              type: object
            paymentInstrument:
              type: object
    SubscriptionOrOneTimeSale:
      type: object
      description: Subscription details.
      discriminator:
        propertyName: orderType
        mapping:
          subscription-order: '#/components/schemas/Subscription'
          one-time-order: '#/components/schemas/OneTimeSale'
      oneOf:
        - $ref: '#/components/schemas/Subscription'
        - $ref: '#/components/schemas/OneTimeSale'
  requestBodies:
    SubscriptionWebhook:
      content:
        application/json:
          schema:
            properties:
              subscriptionId:
                type: string
                description: ID of the order.
                example: sub_01HRF27SATGE4Z6PBJE6PD8328
              eventType:
                type: string
                description: Type of event that triggered the webhook.
                enum:
                  - order-completed
                  - order-abandoned
                  - subscription-activated
                  - subscription-canceled
                  - subscription-churned
                  - subscription-downgraded
                  - subscription-modified
                  - subscription-reactivated
                  - subscription-renewal-reminder
                  - subscription-renewed
                  - subscription-trial-converted
                  - subscription-trial-end-changed
                  - subscription-trial-end-reminder
                  - subscription-trial-ended
                  - subscription-upgraded
                  - order-delinquency-reached
                  - subscription-items-changed
              _embedded:
                type: object
                description: Embedded objects related to the order event.
                properties:
                  subscription:
                    $ref: '#/components/schemas/SubscriptionOrOneTimeSale'
              _links:
                type: array
                description: Links to related resources.
                items:
                  type: object
                  properties:
                    href:
                      description: URL of the link.
                      type: string
                    rel:
                      description: Relationship type of the link.
                      type: string
                      enum:
                        - subscription
      description: Payload of order-related webhook event.
```
