Developer Docs

Developer Docs

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

›Contracts

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

Terminate a contract with notice

To terminate a contract and have billwerk honor the notice period, you need to query a cancellation preview to derive the enddate based on the notice period defined in the plan variant currently booked. Then you need to end the contract accordingly.

Sample request

GET /Contracts/{contractId}/cancellationPreview

{
  "NextPossibleCancellationDate": "2018-02-07T23:00:00Z",
  "EndDate": "2018-02-08T23:00:00Z", //You'll want to post this EndDate later
  "Invoice": {...},
  "ContractAfter": {...}
}

The cancellation preview provides the EndDate of a contract if it would be cancelled at the moment of the request, while honoring the notice period defined in the plan variantcurrently active in the contract.

NextPossibleCancellationDate describes the point in time, until which the contract can be cancelled while honoring the notice period and still realizing the EndDate provided in the preview. If you or the customer cancels the contract before the NextPossibleCancellationDate, the EndDate from the preview will be applied.

POST /Contracts/{contractId}/end

{
  "EndDate": "2018-02-08T23:00:00Z"
}
Last updated on 3/18/2020 by Stollemax
← Up/-downgrading to a plan variantTerminate a contract without notice →
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