Skip to main content
POST
/
customer-subscriptions
Create Customer Subscription
curl --request POST \
  --url https://api.mijnklantportaal.nl/v1/customer-subscriptions \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "customerId": "cst_abc12345def678",
  "description": "Contribution costs",
  "startDate": "2024-05-04",
  "interval": "1 year",
  "amount": "12.95",
  "vatRate": 21,
  "createInvoice": true,
  "invoiceDescription": "Extending subscription"
}
'
{
  "id": "sub__abc12345def678",
  "customerId": "cst_abc12345def678",
  "description": "Website maintenance contract",
  "startsAt": "2024-04-29",
  "interval": "1 year",
  "renewsAt": "2025-04-29",
  "currency": "EUR",
  "amount": "12.95",
  "vatRate": 21,
  "status": "in_progress",
  "options": {
    "createInvoice": true,
    "invoiceDescription": "Extending subscription"
  },
  "terminatedAt": "2024-04-29T21:00:00+02:00",
  "createdAt": "2024-04-29T21:00:00+02:00"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
customerId
string
required

ID of the customer this offer is meant for

Example:

"cst_abc12345def678"

description
string
required

Description of the Subscription

Example:

"Contribution costs"

startDate
string
required

Date the subscription should or has started, as format YYYY-mm-dd.

Example:

"2024-05-04"

interval
string
required

The interval of which the subscription will be extended. Can be 14 days, 1 month, 2 months, 6 months or 1 year.

Example:

"1 year"

amount
string
required

Amount to be charged in Euro (EUR), as string.

Example:

"12.95"

vatRate
integer
required

The VAT rate percentage as integer. Can be 0, 9 or 21.

Example:

21

createInvoice
boolean

Indicates if MijnKlantportaal should create an invoice in the connected bookkeeping integration. Can only be set to true when an integration has been set up already.

Example:

true

invoiceDescription
string

The string which will be added as row on the created invoice. Will be ignored when createInvoice is set to false or omitted.

Example:

"Extending subscription"

Response

The created Customer Subscription

Customer Subscription

id
string

ID of the subscription, always starting with sub_.

Example:

"sub__abc12345def678"

customerId
string

ID of the customer which the subscription belongs to.

Example:

"cst_abc12345def678"

description
string

Description of the subscription

Example:

"Website maintenance contract"

startsAt
string

Start date of the subscription. Formatted as YYYY-mm-dd.

Example:

"2024-04-29"

interval
string

The interval of which the subscription will be extended. Can be 14 days, 1 month, 2 months, 6 months or 1 year.

Example:

"1 year"

renewsAt
string

Date of when the subscription will be renewed next. Formatted as YYYY-mm-dd.

Example:

"2025-04-29"

currency
string

Currency of the subscription amount.

Example:

"EUR"

amount
string

Amount value as string.

Example:

"12.95"

vatRate
integer

The VAT rate percentage as integer. Can be 0, 9 or 21.

Example:

21

status
string

The current status of the subscription. Can be planned, in_progress, terminated or ended.

Example:

"in_progress"

options
object

Settings of the subscription

terminatedAt
string

Date and time when the subscription was terminated. Written in ATOM format.

Example:

"2024-04-29T21:00:00+02:00"

createdAt
string

Date and time when the subscription was added to MijnKlantportaal. Written in ATOM format.

Example:

"2024-04-29T21:00:00+02:00"