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

Properties

Name

Type

Mandatory

Default

Example

Description

addOnGuid

STRING

-

 

a863d62e-d53b-4651-9b7b-xxxxxxxxxxxx

Unique GUID

merchantId

STRING

-

 

 

Readable ID of the merchant

createdTs

TIMESTAMP

-

 

 

Timestamp of AddOn creation

subscriptionGuid

STRING

YES

 

a863d62e-d53b-4651-9b7b-xxxxxxxxxxxx

Unique GUID of Subscription

contactGuid

STRING

YES

 

a863d62e-d53b-4651-9b7b-xxxxxxxxxxxx

Unique GUID of Contact

dataGuid

STRING

NO

 

a863d62e-d53b-4651-9b7b-xxxxxxxxxxxx

Unique GUID of DataSet holdning metaData

name

STRING

YES

 

Gift

Name of AddOn

description

STRING

NO

 

 

Invoice description

quantity

INTEGER

NO

1

1

Quantity

unit

STRING

YES

 

pcs

Unit

unitPrice

DOUBLE

YES

 

100.0

Unit price of a single AddOn

amount

DOUBLE

YES

 

100.0

Summarized amount excluding VAT

amountVat

DOUBLE

YES

 

0.0

Amount VAT

amountTotal

DOUBLE

YES

 

100.0

Total amount including VAT

vatPercentage

DOUBLE

YES

 

0.0

VAT percentage

taxDeductable

BOOLEAN

YES

 

 

Defines basis for tax deductibility

state

STRING

-

 

 

Please see list of AddOn States below

externalId

STRING

NO

 

 

An external ID

purposeAccountingCode

STRING(32)

NO

 

 

Accounting code provided by Merchant

startDate

DATE

NO

 

 

Start of Add On

expiresAfterDate

DATE

NO

 

 

Date of expiration

cancelledTs

TIMESTAMP

-

 

 

Timestamp of cancellation

archivedTs

TIMESTAMP

-

 

 

Timestamp of archivation

includeImplicitInAgreement

BOOLEAN

NO

 

 

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

 

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

 

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.