Developer Docs

Developer Docs

  • Getting Started
  • SubscriptionJS
  • REST API
  • Webhooks
  • Code Samples
  • UseCases
  • Request a Demo

›Component subscriptions

Introduction

  • Introduction

Contracts

  • Adding contract for new customer
  • Adding contract for existing customer
  • Adding future contract without invoicing
  • Up/-downgrading to a plan variant
  • Terminate a contract with notice
  • Terminate a contract without notice

Components

    Component subscriptions

    • Concept
    • Adding/removing
    • In-/decreasing quantity
    • Override for components

    Metered usage components

    • Concept
    • Bill metered usage
    • Override for metered usage

Discounts

  • Adding discounts
  • Adding discounts via coupon

Miscellaneous

  • Rated items
  • Email Notification Template

In-/decreasing quantity of component subscriptions

Sample request

POST /Orders

{
  "TriggerInterimBilling": false,
  "ContractId": "5e53dab7443e5516749566e2",
  "Cart": {
    "InheritStartDate": false,
    "ComponentSubscriptions": [
      {
        "ComponentId": "5e53dab7443e5516749566fb",
        "Quantity": 4.0
      }
    ],
    "EndComponentSubscriptions": [
      "5e53dab7443e5516749566fb"
    ]
  },
  "PreviewAfterTrial": false
}

If you simply want to change the quantity of a subscribed component, there is a shortcut. Subscribe to a component with the new quantity. In EndComponentSubscription pass the ComponentId instead of listing ComponentSubscriptionIds. All corresponding subscriptions will be ended. This way the new subscription will be the only existing one for the component.

Sample response

{
  "Id": "5e53dab7443e551674956710",
  "AllowWithoutPaymentData": true,
  "ComponentSubscriptions": [
    {
      "ComponentType": "QuantityBased",
      "PreventModification": false,
      "VatPercentage": 19.0,
      "TotalNet": 4.0,
      "TotalVat": 0.76,
      "IsQuantityBased": false,
      "ComponentId": "5e53dab7443e5516749566fb",
      "Quantity": 4.0
    }
  ],
  "Total": 7.0,
  "TotalVat": 1.33,
  "TotalGross": 0.0,
  "NextTotalGross": 0.0,
  "IsTrial": false,
  "TrialEndPolicy": "NoTrial",
  "Status": "InProgress",
  "OrderType": "Signup",
  "TriggerInterimBilling": false,
  "CustomerId": "5e53dab7443e551674956711",
  "ContractId": "5e53dab7443e5516749566e2",
  "PreviewAfterTrial": false
}
Last updated on 3/17/2020 by Stollemax
← Adding/removingOverride for components →
Docs
Getting StartedAPI Reference
Resource
Help CenterSupportBlogTutorials
Start with billwerk
Test for free
Request a Demo
Already started?
billwerk Sandboxbillwerk Production
billwerk GmbH
© Made with ❤ in Germany for Europe by billwerk GmbH | 2022
Imprint
|
Data Privacy Rules
|
Disclaimer