Developer Docs

Developer Docs

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

›Discounts

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

Adding discounts

Adding discounts to an order works very similar to adding a component. It can be applied in signup and up-/downgrade orders. Specifying a start date is optional.

Sample request

POST /Orders

{
  "TriggerInterimBilling": false,
  "ContractId": "5e53dab7443e5516749566e2",
  "Cart": {
    "InheritStartDate": false,
    "DiscountSubscriptions": [
      {
        "StartDate": "2020-02-26T14:16:23.7556386Z",
        "DiscountId": "5e53dab7443e5516749566fc"
      }
    ]
  },
  "PreviewAfterTrial": false
}

The example shows adding a discount to an upgrade order.

Sample response

{
  "Id": "5e53dab7443e551674956714",
  "AllowWithoutPaymentData": false,
  "Total": 10.0,
  "TotalVat": 1.9,
  "TotalGross": 0.0,
  "NextTotalGross": 0.0,
  "IsTrial": false,
  "TrialEndPolicy": "NoTrial",
  "Status": "InProgress",
  "OrderType": "Signup",
  "TriggerInterimBilling": false,
  "CustomerId": "5e53dab7443e551674956715",
  "ContractId": "5e53dab7443e5516749566e2",
  "PreviewAfterTrial": false
}
Last updated on 3/17/2020 by Stollemax
← Override for metered usageAdding discounts via coupon →
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