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

Adding contract for new customer

For simple signup/subscription implementation we recommend using SubscriptionJS rather than API, unless you have strong reasons.

Sample request

POST /Orders

{
  "TriggerInterimBilling": false,
  "Cart": {
    "PlanVariantId": "5e5361659cc9ba118cccc620",
    "InheritStartDate": false,
    "ComponentSubscriptions": [
      {
        "ComponentId": "5e5361659cc9ba118cccc61e",
        "Quantity": 2.0
      }
    ]
  },
  "Customer": {
    "CompanyName": "ACME Inc.",
    "FirstName": "John",
    "LastName": "Doe",
    "VatId": "DE424324234",
    "EmailAddress": "john.doe@example.com",
    "Address": {
      "AddressLine1": "c/o Coworking Ltd.",
      "Street": "Zschopauer Straße",
      "HouseNumber": "42",
      "PostalCode": "10123",
      "City": "Berlin",
      "Country": "DE"
    },
    "Hidden": false
  },
  "PreviewAfterTrial": false
}

Remove ComponentSubscriptions or pass empty array if no components are being subscribed to.

Sample response

{
  "Id": "5e5361659cc9ba118cccc62f",
  "AllowWithoutPaymentData": true,
  "ComponentSubscriptions": [
    {
      "ComponentType": "QuantityBased",
      "PreventModification": false,
      "VatPercentage": 19.0,
      "TotalNet": 2.0,
      "TotalVat": 0.38,
      "IsQuantityBased": false,
      "ComponentId": "5e5361659cc9ba118cccc61e",
      "Quantity": 2.0
    }
  ],
  "Total": 7.0,
  "TotalVat": 1.33,
  "TotalGross": 0.0,
  "NextTotalGross": 0.0,
  "IsTrial": false,
  "TrialEndPolicy": "NoTrial",
  "Status": "InProgress",
  "OrderType": "Signup",
  "TriggerInterimBilling": false,
  "CustomerId": "5e5361659cc9ba118cccc630",
  "ContractId": "5e5361659cc9ba118cccc605",
  "PreviewAfterTrial": false
}
Last updated on 3/17/2020 by Stollemax
← IntroductionAdding contract for existing customer →
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