Payment API

AddOn

API Documentation

Senest redigeret:

Introduction

An Add On represents a single Add On on top of an Agreement in relation to a Subscription

Endpoints

GET /addOn/{guid}

Get a single Add On.

Response

HTTP

Description

200

OK

404

Add On not found

HTTP 200 Example
{
  "addOnGuid": "",
  "name": "",
  "description": "",
  "createdTs": "",
  "subscriptionGuid": "",
  "dataSetGuid": "",
  "quantity": "",
  "unit": "",
  "unitPrice": "",
  "amount": "",
  "amountVat": "",
  "amountTotal": "",
  "vatPercentage": "",
  "taxDeductable": "",
  "state": "",
  "externalId": "",
  "purposeAccountingCode": "",
  "expiresAfterDate": "",
  "archivedTs": "",
  "includeImplicitInAgreement": ""
}

POST /addOn

Insert a single AddOn.

Request

The following must be provided as the request body:

{
  "subscriptionGuid": "a863d62e-d53b-4651-9b7b-xxxxxxxxxxxx",
  "name": "Gift",
  "description": "A small gift",
  "quantity": 1,
  "unit": "pcs",
  "unitPrice": 10.0,
  "amount": 10.0,
  "amountVat": 0.0,
  "amountTotal": 10.0,
  "vatPercentage": 0.0,
  "taxDeductable": true,
  "externalId": "xyz",
  "dataSetGuid": "a863d62e-d53b-4651-9b7b-xxxxxxxxxxxx",
  "purposeAccountingCode": "gift",
  "expiresAfterDate": "2020-01-01",
  "includeImplicitInAgreement": false
}

Response

HTTP

Description

201

Created

400

Something's wrong with request body.

HTTP 200 Example
{
  "addOnGuid": "a863d62e-d53b-4651-9b7b-xxxxxxxxxxxx",
  "...": "..."
}

PUT /addOn/{guid}

Update a single AddOn.

Request

The following must be provided as the request body:

{
  "name": "Gift",
  "description": "A small gift",
  "quantity": 1,
  "unit": "pcs",
  "unitPrice": 10.0,
  "amount": 10.0,
  "amountVat": 0.0,
  "amountTotal": 10.0,
  "vatPercentage": 0.0,
  "taxDeductable": true,
  "externalId": "xyz",
  "dataSetGuid": "a863d62e-d53b-4651-9b7b-xxxxxxxxxxxx",
  "purposeAccountingCode": "gift",
  "expiresAfterDate": "2020-01-01",
  "includeImplicitInAgreement": false
}

Response

HTTP

Description

200

OK

400

Something's wrong with request body.

404

AddOn was not found

HTTP 200 Example
{
  "addOnGuid": "a863d62e-d53b-4651-9b7b-xxxxxxxxxxxx",
  "...": "..."
}

POST /addOn/{guid}/Cancel

Cancels a single AddOn.

Response

HTTP

Description

200

OK

400

Bad request

404

Not found

POST /addOn/{guid}/Archive

Archives a single AddOn.

Response

HTTP

Description

200

OK

400

Bad request

404

Not found

 

Schema

Property

Format and Description

addOnGuid string<uuid>

Unique Guid

subscriptionGuid

required

string<uuid>

Unique Guid

contactGuid

required

string<uuid>

Unique Guid

dataSetGuid string<uuid>

Unique Guid

createdTs string<yyyy-MM-dd HH:mm:ss zzzz>

Timestamp of creation

updatedTs string<yyyy-MM-dd HH:mm:ss zzzz>

Timestamp of update

cancelledTs string<yyyy-MM-dd HH:mm:ss zzzz>

Timestamp of cancellation

archivedTs string<yyyy-MM-dd HH:mm:ss zzzz>

Timestamp of archivation

merchantId string

Unique ID of merchant

name

required

string

The name of the record

description string

Description of the record

quantity integer

Quantity

Default: 1

unit

required

string

Type of unit

unitPrice

required

number

Unit price of a single AddOn

amount

required

number

Summarized amount excluding VAT

amountVat

required

number

Amount VAT

amountTotal

required

number

Total amount including VAT

vatPercentage

required

number

VAT percentage

taxDeductable boolean

Defines basis for tax deductibility

state

string

Enum:"Active","Inactive","Archived" (Read more)

purposeAccountingCode string

Accounting code provided by Merchant

startDate string<yyyy-MM-dd>

Start date

expiresAfterDate string<yyyy-MM-dd>

Expires after date

includeImplicitInAgreement boolean

Looking at the invoice, is the Add On amount included in the Agreement amount?

 

Example

{
   "addOnGuid": "a863d62e-d53b-4651-9b7b-xxxxxxxxxxxx",
   "subscriptionGuid": "a863d62e-d53b-4651-9b7b-xxxxxxxxxxxx",
   "contactGuid": "a863d62e-d53b-4651-9b7b-xxxxxxxxxxxx",
   "dataSetGuid": "a863d62e-d53b-4651-9b7b-xxxxxxxxxxxx",
   "createdTs": "2019-12-31 15:59:59 +0100",
   "updatedTs": "2019-12-31 15:59:59 +0100",
   "cancelledTs": "2019-12-31 15:59:59 +0100",
   "archivedTs": "2019-12-31 15:59:59 +0100",
   "merchantId": "your-merchant",
   "name": "string",
   "description": "string",
   "quantity": 1,
   "unit": "pcs",
   "unitPrice": 100,
   "amount": 100,
   "amountVat": 0,
   "amountTotal": 100,
   "vatPercentage": 0,
   "taxDeductable": true,
   "state": "Active",
   "purposeAccountingCode": "donation",
   "startDate": "2019-01-01",
   "expiresAfterDate": "2020-01-01",
   "includeImplicitInAgreement": false
}

 

AddOn States

Following is a list of AddOn states:

State

Description

Active

Subscription is active and will result in future Payments.

Inactive

Subscription is inactive.

Archived

Subscription was archived and is therefore hidden from queries.