Skip to main content

Fincome API (v1)

Download OpenAPI specification:Download

Introduction

Welcome to Fincome's API documentation! This API allows you to import and manage the data of your Fincome account.

Authentication

First, go to your account settings, tab "Developers", and click on "Create a secret key".

Base API URL

The base API URL is https://api2.fincome.co/product.

Customers

Retrieve A Customer By Id

Use this endpoint to retrieve a customer by providing its id.

Authorizations:
APIKey
path Parameters
id
required
string (Id)

The id of the customer to retrieve

Responses

Response samples

Content type
application/json
{
  • "created_at": "2019-08-24T14:15:22Z",
  • "updated_at": "2019-08-24T14:15:22Z",
  • "id": "string",
  • "name": "string",
  • "email": "string",
  • "country": "string",
  • "zip_code": "string",
  • "custom_properties": { }
}

Delete A Customer By Id

Use this endpoint to delete a customer by providing its id.

Authorizations:
APIKey
path Parameters
id
required
string (Id)

The id of the customer to delete

Responses

Response samples

Content type
application/json
{
  • "detail": [
    ]
}

Update A Customer By Id

Use this endpoint to update a customer by id. Partial updates are supported: only the fields specified in the request body will be updated. Custom properties are supported and can be set in the custom_properties (dictionary) inside the request body.

Authorizations:
APIKey
path Parameters
id
required
string (Id)

The id of the customer to update

Request Body schema: application/json
required
id
string (Id)

Unique identifier for the customer.

name
string (Name)

Name of the customer

email
string (Email)

Email of the customer

country
string (Country)

Country of the customer

zip_code
string (Zip Code)

Zip code of the customer

object (Custom Properties)
Default: {}

Custom properties

Responses

Request samples

Content type
application/json
{
  • "id": "string",
  • "name": "string",
  • "email": "string",
  • "country": "string",
  • "zip_code": "string",
  • "custom_properties": { }
}

Response samples

Content type
application/json
{
  • "created_at": "2019-08-24T14:15:22Z",
  • "updated_at": "2019-08-24T14:15:22Z",
  • "id": "string",
  • "name": "string",
  • "email": "string",
  • "country": "string",
  • "zip_code": "string",
  • "custom_properties": { }
}

Create A New Customer

Use this endpoint to create a new customer. Custom properties are supported and can be set in the custom_properties (dictionary) inside the request body.

Authorizations:
APIKey
Request Body schema: application/json
required
id
required
string (Id)

Unique identifier for the customer.

name
string (Name)

Name of the customer

email
string (Email)

Email of the customer

country
string (Country)

Country of the customer

zip_code
string (Zip Code)

Zip code of the customer

object (Custom Properties)
Default: {}

Custom properties

Responses

Request samples

Content type
application/json
{
  • "id": "string",
  • "name": "string",
  • "email": "string",
  • "country": "string",
  • "zip_code": "string",
  • "custom_properties": { }
}

Response samples

Content type
application/json
{
  • "created_at": "2019-08-24T14:15:22Z",
  • "updated_at": "2019-08-24T14:15:22Z",
  • "id": "string",
  • "name": "string",
  • "email": "string",
  • "country": "string",
  • "zip_code": "string",
  • "custom_properties": { }
}

Products

Retrieve A Product By Id

Use this endpoint to retrieve a product by providing its id.

Authorizations:
APIKey
path Parameters
id
required
string (Id)

The id of the product to retrieve

Responses

Response samples

Content type
application/json
{
  • "created_at": "2019-08-24T14:15:22Z",
  • "updated_at": "2019-08-24T14:15:22Z",
  • "id": "string",
  • "name": "string",
  • "custom_properties": { }
}

Delete A Product By Id

Use this endpoint to delete a product by providing its id.

Authorizations:
APIKey
path Parameters
id
required
string (Id)

The id of the product to delete

Responses

Response samples

Content type
application/json
{
  • "detail": [
    ]
}

Update A Product By Id

Use this endpoint to update a product by id. Partial updates are supported: only the fields specified in the request body will be updated. Custom properties are supported and can be set in the custom_properties (dictionary) inside the request body.

Authorizations:
APIKey
path Parameters
id
required
string (Id)

The id of the product to update

Request Body schema: application/json
required
id
string (Id)

Unique identifier for the product.

name
string (Name)

Name of the product

object (Custom Properties)
Default: {}

Custom properties

Responses

Request samples

Content type
application/json
{
  • "id": "string",
  • "name": "string",
  • "custom_properties": { }
}

Response samples

Content type
application/json
{
  • "created_at": "2019-08-24T14:15:22Z",
  • "updated_at": "2019-08-24T14:15:22Z",
  • "id": "string",
  • "name": "string",
  • "custom_properties": { }
}

Create A New Product

Use this endpoint to create a new product. Custom properties are supported and can be set in the custom_properties (dictionary) inside the request body.

Authorizations:
APIKey
Request Body schema: application/json
required
id
required
string (Id)

Unique identifier for the product.

name
string (Name)

Name of the product

object (Custom Properties)
Default: {}

Custom properties

Responses

Request samples

Content type
application/json
{
  • "id": "string",
  • "name": "string",
  • "custom_properties": { }
}

Response samples

Content type
application/json
{
  • "created_at": "2019-08-24T14:15:22Z",
  • "updated_at": "2019-08-24T14:15:22Z",
  • "id": "string",
  • "name": "string",
  • "custom_properties": { }
}

Prices

Retrieve A Price By Id

Use this endpoint to retrieve a price by providing its id.

Authorizations:
APIKey
path Parameters
id
required
string (Id)

The id of the price to retrieve

Responses

Response samples

Content type
application/json
{
  • "created_at": "2019-08-24T14:15:22Z",
  • "updated_at": "2019-08-24T14:15:22Z",
  • "id": "string",
  • "name": "string",
  • "period_unit": "string",
  • "period_length": 0,
  • "product_id": "string",
  • "type": "string",
  • "amount": 0,
  • "currency_code": "string",
  • "custom_properties": { }
}

Delete A Price By Id

Use this endpoint to delete a price by providing its id.

Authorizations:
APIKey
path Parameters
id
required
string (Id)

The id of the price to delete

Responses

Response samples

Content type
application/json
{
  • "detail": [
    ]
}

Update A Price By Id

Use this endpoint to update a price by id. Partial updates are supported: only the fields specified in the request body will be updated. Custom properties are supported and can be set in the custom_properties (dictionary) inside the request body.

Authorizations:
APIKey
path Parameters
id
required
string (Id)

The id of the price to update

Request Body schema: application/json
required
id
string (Id)

Unique identifier for the price.

name
string (Name)

Name of the price item

period_unit
string (Period Unit)

Time unit of the billing frequency (only for subscription type). Possible values: day, week, month, year

period_length
integer (Period Length)

Number of units of the billing frequency (only for subscription type).

product_id
string (Product Id)

Identifier of the product related to this price item

type
string (Type)

Type of the price item. Possible values: one_off, subscription

amount
number (Amount)

Amount of the price item

currency_code
string (Currency Code)

Currency code

object (Custom Properties)
Default: {}

Custom properties

Responses

Request samples

Content type
application/json
{
  • "id": "string",
  • "name": "string",
  • "period_unit": "string",
  • "period_length": 0,
  • "product_id": "string",
  • "type": "string",
  • "amount": 0,
  • "currency_code": "string",
  • "custom_properties": { }
}

Response samples

Content type
application/json
{
  • "created_at": "2019-08-24T14:15:22Z",
  • "updated_at": "2019-08-24T14:15:22Z",
  • "id": "string",
  • "name": "string",
  • "period_unit": "string",
  • "period_length": 0,
  • "product_id": "string",
  • "type": "string",
  • "amount": 0,
  • "currency_code": "string",
  • "custom_properties": { }
}

Create A New Price

Use this endpoint to create a new price. Custom properties are supported and can be set in the custom_properties (dictionary) inside the request body.

Authorizations:
APIKey
Request Body schema: application/json
required
id
required
string (Id)

Unique identifier for the price.

name
string (Name)

Name of the price item

period_unit
string (Period Unit)

Time unit of the billing frequency (only for subscription type). Possible values: day, week, month, year

period_length
integer (Period Length)

Number of units of the billing frequency (only for subscription type).

product_id
string (Product Id)

Identifier of the product related to this price item

type
string (Type)

Type of the price item. Possible values: one_off, subscription

amount
number (Amount)

Amount of the price item

currency_code
string (Currency Code)

Currency code

object (Custom Properties)
Default: {}

Custom properties

Responses

Request samples

Content type
application/json
{
  • "id": "string",
  • "name": "string",
  • "period_unit": "string",
  • "period_length": 0,
  • "product_id": "string",
  • "type": "string",
  • "amount": 0,
  • "currency_code": "string",
  • "custom_properties": { }
}

Response samples

Content type
application/json
{
  • "created_at": "2019-08-24T14:15:22Z",
  • "updated_at": "2019-08-24T14:15:22Z",
  • "id": "string",
  • "name": "string",
  • "period_unit": "string",
  • "period_length": 0,
  • "product_id": "string",
  • "type": "string",
  • "amount": 0,
  • "currency_code": "string",
  • "custom_properties": { }
}

Invoices

Retrieve An Invoice By Id

Use this endpoint to retrieve an invoice by providing its id.

Authorizations:
APIKey
path Parameters
id
required
string (Id)

The id of the invoice to retrieve

Responses

Response samples

Content type
application/json
{
  • "created_at": "2019-08-24T14:15:22Z",
  • "updated_at": "2019-08-24T14:15:22Z",
  • "id": "string",
  • "customer_id": "string",
  • "invoice_number": "string",
  • "date": "2019-08-24T14:15:22Z",
  • "status": "string",
  • "is_renew": "string",
  • "custom_properties": { },
  • "invoice_line_items": [ ]
}

Delete An Invoice By Id

Use this endpoint to delete an invoice by providing its id.

Authorizations:
APIKey
path Parameters
id
required
string (Id)

The id of the invoice to delete

Responses

Response samples

Content type
application/json
{
  • "detail": [
    ]
}

Update An Invoice By Id

Use this endpoint to update an invoice by id. Partial updates are supported: only the fields specified in the request body will be updated. Custom properties are supported and can be set in the custom_properties (dictionary) inside the request body.

Authorizations:
APIKey
path Parameters
id
required
string (Id)

The id of the invoice to update

Request Body schema: application/json
required
id
string (Id)

Unique identifier for the invoice.

customer_id
string (Customer Id)

Identifier of the customer to whom the invoice belongs

invoice_number
string (Invoice Number)

Invoice number

date
string <date-time> (Date)

Issue date of the invoice

status
string (Status)

Status of the invoice. Possible values: open, pending, paid, unpaid, void

is_renew
string (Is Renew)

Flag indicating if the invoice is originated from the renewal of a subscription

object (Custom Properties)
Default: {}

Custom properties

Responses

Request samples

Content type
application/json
{
  • "id": "string",
  • "customer_id": "string",
  • "invoice_number": "string",
  • "date": "2019-08-24T14:15:22Z",
  • "status": "string",
  • "is_renew": "string",
  • "custom_properties": { }
}

Response samples

Content type
application/json
{
  • "created_at": "2019-08-24T14:15:22Z",
  • "updated_at": "2019-08-24T14:15:22Z",
  • "id": "string",
  • "customer_id": "string",
  • "invoice_number": "string",
  • "date": "2019-08-24T14:15:22Z",
  • "status": "string",
  • "is_renew": "string",
  • "custom_properties": { },
  • "invoice_line_items": [ ]
}

Create A New Invoice

Use this endpoint to create a new invoice. Custom properties are supported and can be set in the custom_properties (dictionary) inside the request body.

Authorizations:
APIKey
Request Body schema: application/json
required
id
required
string (Id)

Unique identifier for the invoice.

customer_id
required
string (Customer Id)

Identifier of the customer to whom the invoice belongs

invoice_number
string (Invoice Number)

Invoice number

date
required
string <date-time> (Date)

Issue date of the invoice

status
required
string (Status)

Status of the invoice. Possible values: open, pending, paid, unpaid, void

is_renew
string (Is Renew)

Flag indicating if the invoice is originated from the renewal of a subscription

object (Custom Properties)
Default: {}

Custom properties

Array of objects (Invoice Line Items)
Default: []

List of invoice line items belonging to this invoice

Responses

Request samples

Content type
application/json
{
  • "id": "string",
  • "customer_id": "string",
  • "invoice_number": "string",
  • "date": "2019-08-24T14:15:22Z",
  • "status": "string",
  • "is_renew": "string",
  • "custom_properties": { },
  • "invoice_line_items": [ ]
}

Response samples

Content type
application/json
{
  • "created_at": "2019-08-24T14:15:22Z",
  • "updated_at": "2019-08-24T14:15:22Z",
  • "id": "string",
  • "customer_id": "string",
  • "invoice_number": "string",
  • "date": "2019-08-24T14:15:22Z",
  • "status": "string",
  • "is_renew": "string",
  • "custom_properties": { },
  • "invoice_line_items": [ ]
}

Credit Notes

Retrieve A Credit Note By Id

Use this endpoint to retrieve a credit note by providing its id.

Authorizations:
APIKey
path Parameters
id
required
string (Id)

The id of the credit note to retrieve

Responses

Response samples

Content type
application/json
{
  • "created_at": "2019-08-24T14:15:22Z",
  • "updated_at": "2019-08-24T14:15:22Z",
  • "id": "string",
  • "invoice_id": "string",
  • "date": "2019-08-24T14:15:22Z",
  • "status": "string",
  • "custom_properties": { },
  • "credit_note_line_items": [ ]
}

Delete A Credit Note By Id

Use this endpoint to delete a credit note by providing its id.

Authorizations:
APIKey
path Parameters
id
required
string (Id)

The id of the credit note to delete

Responses

Response samples

Content type
application/json
{
  • "detail": [
    ]
}

Update A Credit Note By Id

Use this endpoint to update a credit note by id. Partial updates are supported: only the fields specified in the request body will be updated. Custom properties are supported and can be set in the custom_properties (dictionary) inside the request body.

Authorizations:
APIKey
path Parameters
id
required
string (Id)

The id of the credit note to update

Request Body schema: application/json
required
id
string (Id)

Unique identifier for the credit note.

invoice_id
string (Invoice Id)

Identifier of the invoice to which this credit note is attached

date
string <date-time> (Date)

Issue date of the credit note

status
string (Status)

Status of the invoice. Possible values: refunded, refund_due

object (Custom Properties)
Default: {}

Custom properties

Responses

Request samples

Content type
application/json
{
  • "id": "string",
  • "invoice_id": "string",
  • "date": "2019-08-24T14:15:22Z",
  • "status": "string",
  • "custom_properties": { }
}

Response samples

Content type
application/json
{
  • "created_at": "2019-08-24T14:15:22Z",
  • "updated_at": "2019-08-24T14:15:22Z",
  • "id": "string",
  • "invoice_id": "string",
  • "date": "2019-08-24T14:15:22Z",
  • "status": "string",
  • "custom_properties": { },
  • "credit_note_line_items": [ ]
}

Create A New Credit Note

Use this endpoint to create a new credit note. Custom properties are supported and can be set in the custom_properties (dictionary) inside the request body.

Authorizations:
APIKey
Request Body schema: application/json
required
id
required
string (Id)

Unique identifier for the credit note.

invoice_id
required
string (Invoice Id)

Identifier of the invoice to which this credit note is attached

date
string <date-time> (Date)

Issue date of the credit note

status
string (Status)

Status of the invoice. Possible values: refunded, refund_due

object (Custom Properties)
Default: {}

Custom properties

Array of objects (Credit Note Line Items)
Default: []

List of credit note line items belonging to this credit note

Responses

Request samples

Content type
application/json
{
  • "id": "string",
  • "invoice_id": "string",
  • "date": "2019-08-24T14:15:22Z",
  • "status": "string",
  • "custom_properties": { },
  • "credit_note_line_items": [ ]
}

Response samples

Content type
application/json
{
  • "created_at": "2019-08-24T14:15:22Z",
  • "updated_at": "2019-08-24T14:15:22Z",
  • "id": "string",
  • "invoice_id": "string",
  • "date": "2019-08-24T14:15:22Z",
  • "status": "string",
  • "custom_properties": { },
  • "credit_note_line_items": [ ]
}

Subscriptions

Retrieve A Subscription By Id

Use this endpoint to retrieve a subscription by providing its id.

Authorizations:
APIKey
path Parameters
id
required
string (Id)

The id of the subscription to retrieve

Responses

Response samples

Content type
application/json
{
  • "created_at": "2019-08-24T14:15:22Z",
  • "updated_at": "2019-08-24T14:15:22Z",
  • "id": "string",
  • "customer_id": "string",
  • "status": "string",
  • "subscription_set_id": "string",
  • "trial_start": "2019-08-24T14:15:22Z",
  • "trial_end": "2019-08-24T14:15:22Z",
  • "canceled_at": "2019-08-24T14:15:22Z",
  • "subscription_start_date": "2019-08-24T14:15:22Z",
  • "contractual_commitment_end_date": "2019-08-24T14:15:22Z",
  • "monthly_value": 0,
  • "currency_code": "string",
  • "price_id": "string",
  • "custom_properties": { }
}

Delete A Subscription By Id

Use this endpoint to delete a subscription by providing its id.

Authorizations:
APIKey
path Parameters
id
required
string (Id)

The id of the subscription to delete

Responses

Response samples

Content type
application/json
{
  • "detail": [
    ]
}

Update A Subscription By Id

Use this endpoint to update a subscription by id. Partial updates are supported: only the fields specified in the request body will be updated. Custom properties are supported and can be set in the custom_properties (dictionary) inside the request body.

Authorizations:
APIKey
path Parameters
id
required
string (Id)

The id of the subscription to update

Request Body schema: application/json
required
id
string (Id)

Unique identifier for the subscription.

customer_id
string (Customer Id)

Identifier of the customer to which this subscription belongs

status
string (Status)

Status of the subscription. One of trialing, active, paused, canceled, unpaid

subscription_set_id
string (Subscription Set Id)

Identifier of the subscription set to which this subscription belongs

trial_start
string <date-time> (Trial Start)

Start date (UTC) of the trial period (if any)

trial_end
string <date-time> (Trial End)

End date (UTC) of the trial period (if any)

canceled_at
string <date-time> (Canceled At)

If the subscription was cancelled, the cancellation date (UTC)

subscription_start_date
string <date-time> (Subscription Start Date)

The date (UTC) when the subscription started or will start in the future. Corresponds to the start date of the first invoice and the beginning of the service period.

contractual_commitment_end_date
string <date-time> (Contractual Commitment End Date)

If the subscription is in a contractual commitment, the end date (UTC) of the commitment

monthly_value
number (Monthly Value)

Monthly value of the subscription

currency_code
string (Currency Code)

Currency code of the monthly value of the subscription

price_id
string (Price Id)

Identifier of the price object (a plan) to which this subscription belongs

object (Custom Properties)
Default: {}

Custom properties

Responses

Request samples

Content type
application/json
{
  • "id": "string",
  • "customer_id": "string",
  • "status": "string",
  • "subscription_set_id": "string",
  • "trial_start": "2019-08-24T14:15:22Z",
  • "trial_end": "2019-08-24T14:15:22Z",
  • "canceled_at": "2019-08-24T14:15:22Z",
  • "subscription_start_date": "2019-08-24T14:15:22Z",
  • "contractual_commitment_end_date": "2019-08-24T14:15:22Z",
  • "monthly_value": 0,
  • "currency_code": "string",
  • "price_id": "string",
  • "custom_properties": { }
}

Response samples

Content type
application/json
{
  • "created_at": "2019-08-24T14:15:22Z",
  • "updated_at": "2019-08-24T14:15:22Z",
  • "id": "string",
  • "customer_id": "string",
  • "status": "string",
  • "subscription_set_id": "string",
  • "trial_start": "2019-08-24T14:15:22Z",
  • "trial_end": "2019-08-24T14:15:22Z",
  • "canceled_at": "2019-08-24T14:15:22Z",
  • "subscription_start_date": "2019-08-24T14:15:22Z",
  • "contractual_commitment_end_date": "2019-08-24T14:15:22Z",
  • "monthly_value": 0,
  • "currency_code": "string",
  • "price_id": "string",
  • "custom_properties": { }
}

Create A New Subscription

Use this endpoint to create a new subscription. Custom properties are supported and can be set in the custom_properties (dictionary) inside the request body.

Authorizations:
APIKey
Request Body schema: application/json
required
id
required
string (Id)

Unique identifier for the subscription.

customer_id
string (Customer Id)

Identifier of the customer to which this subscription belongs

status
string (Status)

Status of the subscription. One of trialing, active, paused, canceled, unpaid

subscription_set_id
string (Subscription Set Id)

Identifier of the subscription set to which this subscription belongs

trial_start
string <date-time> (Trial Start)

Start date (UTC) of the trial period (if any)

trial_end
string <date-time> (Trial End)

End date (UTC) of the trial period (if any)

canceled_at
string <date-time> (Canceled At)

If the subscription was cancelled, the cancellation date (UTC)

subscription_start_date
string <date-time> (Subscription Start Date)

The date (UTC) when the subscription started or will start in the future. Corresponds to the start date of the first invoice and the beginning of the service period.

contractual_commitment_end_date
string <date-time> (Contractual Commitment End Date)

If the subscription is in a contractual commitment, the end date (UTC) of the commitment

monthly_value
number (Monthly Value)

Monthly value of the subscription

currency_code
string (Currency Code)

Currency code of the monthly value of the subscription

price_id
string (Price Id)

Identifier of the price object (a plan) to which this subscription belongs

object (Custom Properties)
Default: {}

Custom properties

Responses

Request samples

Content type
application/json
{
  • "id": "string",
  • "customer_id": "string",
  • "status": "string",
  • "subscription_set_id": "string",
  • "trial_start": "2019-08-24T14:15:22Z",
  • "trial_end": "2019-08-24T14:15:22Z",
  • "canceled_at": "2019-08-24T14:15:22Z",
  • "subscription_start_date": "2019-08-24T14:15:22Z",
  • "contractual_commitment_end_date": "2019-08-24T14:15:22Z",
  • "monthly_value": 0,
  • "currency_code": "string",
  • "price_id": "string",
  • "custom_properties": { }
}

Response samples

Content type
application/json
{
  • "created_at": "2019-08-24T14:15:22Z",
  • "updated_at": "2019-08-24T14:15:22Z",
  • "id": "string",
  • "customer_id": "string",
  • "status": "string",
  • "subscription_set_id": "string",
  • "trial_start": "2019-08-24T14:15:22Z",
  • "trial_end": "2019-08-24T14:15:22Z",
  • "canceled_at": "2019-08-24T14:15:22Z",
  • "subscription_start_date": "2019-08-24T14:15:22Z",
  • "contractual_commitment_end_date": "2019-08-24T14:15:22Z",
  • "monthly_value": 0,
  • "currency_code": "string",
  • "price_id": "string",
  • "custom_properties": { }
}

Invoice Line Items

Retrieve An Invoice Line Item By Id

Use this endpoint to retrieve an invoice line item by providing its id.

Authorizations:
APIKey
path Parameters
id
required
string (Id)

The id of the invoice line item to retrieve

Responses

Response samples

Content type
application/json
{
  • "created_at": "2019-08-24T14:15:22Z",
  • "updated_at": "2019-08-24T14:15:22Z",
  • "id": "string",
  • "invoice_id": "string",
  • "subscription_id": "string",
  • "price_id": "string",
  • "type": "string",
  • "amount_excluding_tax_after_discount": 0,
  • "tax_amount": 0,
  • "discount_amount": 0,
  • "temporary_discount_amount": 0,
  • "currency_code": "string",
  • "quantity": 0,
  • "description": "string",
  • "period_start": "2019-08-24T14:15:22Z",
  • "period_end": "2019-08-24T14:15:22Z",
  • "proration_target_line_item_id": "string",
  • "custom_properties": { }
}

Delete An Invoice Line Item By Id

Use this endpoint to delete an invoice line item by providing its id.

Authorizations:
APIKey
path Parameters
id
required
string (Id)

The id of the invoice line item to delete

Responses

Response samples

Content type
application/json
{
  • "detail": [
    ]
}

Update An Invoice Line Item By Id

Use this endpoint to update an invoice line item by id. Partial updates are supported: only the fields specified in the request body will be updated. Custom properties are supported and can be set in the custom_properties (dictionary) inside the request body.

Authorizations:
APIKey
path Parameters
id
required
string (Id)

The id of the invoice line item to update

Request Body schema: application/json
required
id
string (Id)

Unique identifier for the invoice line item.

invoice_id
string (Invoice Id)

Identifier of the invoice to which this line item belongs

subscription_id
string (Subscription Id)

Identifier of the subscription to which this line item is related

price_id
string (Price Id)

Identifier of the price to which this line item is related

type
string (Type)

Type of the invoice line item. Possible values: subscription, one_off

amount_excluding_tax_after_discount
number (Amount Excluding Tax After Discount)

Amount of the invoice line item (excluding tax and after discount)

tax_amount
number (Tax Amount)

Tax amount

discount_amount
number (Discount Amount)
Default: 0

Permanent discount amount

temporary_discount_amount
number (Temporary Discount Amount)
Default: 0

Temporary discount_amount

currency_code
string (Currency Code)

Currency code of the invoice line item

quantity
integer (Quantity)

Quantity of bought items

description
string (Description)

Description of the invoice line item

period_start
string <date-time> (Period Start)

Start date (UTC) of the subscription period billed by this line item (only for subscription type)

period_end
string <date-time> (Period End)

End date (UTC) of the subscription period billed by this line item (only for subscription type)

proration_target_line_item_id
string (Proration Target Line Item Id)

In case this line item is a proration line item, the identifier of the original (positive) line item it applies on

object (Custom Properties)
Default: {}

Custom properties

Responses

Request samples

Content type
application/json
{
  • "id": "string",
  • "invoice_id": "string",
  • "subscription_id": "string",
  • "price_id": "string",
  • "type": "string",
  • "amount_excluding_tax_after_discount": 0,
  • "tax_amount": 0,
  • "discount_amount": 0,
  • "temporary_discount_amount": 0,
  • "currency_code": "string",
  • "quantity": 0,
  • "description": "string",
  • "period_start": "2019-08-24T14:15:22Z",
  • "period_end": "2019-08-24T14:15:22Z",
  • "proration_target_line_item_id": "string",
  • "custom_properties": { }
}

Response samples

Content type
application/json
{
  • "created_at": "2019-08-24T14:15:22Z",
  • "updated_at": "2019-08-24T14:15:22Z",
  • "id": "string",
  • "invoice_id": "string",
  • "subscription_id": "string",
  • "price_id": "string",
  • "type": "string",
  • "amount_excluding_tax_after_discount": 0,
  • "tax_amount": 0,
  • "discount_amount": 0,
  • "temporary_discount_amount": 0,
  • "currency_code": "string",
  • "quantity": 0,
  • "description": "string",
  • "period_start": "2019-08-24T14:15:22Z",
  • "period_end": "2019-08-24T14:15:22Z",
  • "proration_target_line_item_id": "string",
  • "custom_properties": { }
}

Create A New Invoice Line Item

Use this endpoint to create a new invoice line item. Custom properties are supported and can be set in the custom_properties (dictionary) inside the request body.

Authorizations:
APIKey
Request Body schema: application/json
required
id
required
string (Id)

Unique identifier for the invoice line item.

invoice_id
required
string (Invoice Id)

Identifier of the invoice to which this line item belongs

subscription_id
string (Subscription Id)

Identifier of the subscription to which this line item is related

price_id
string (Price Id)

Identifier of the price to which this line item is related

type
required
string (Type)

Type of the invoice line item. Possible values: subscription, one_off

amount_excluding_tax_after_discount
required
number (Amount Excluding Tax After Discount)

Amount of the invoice line item (excluding tax and after discount)

tax_amount
required
number (Tax Amount)

Tax amount

discount_amount
number (Discount Amount)
Default: 0

Permanent discount amount

temporary_discount_amount
number (Temporary Discount Amount)
Default: 0

Temporary discount_amount

currency_code
required
string (Currency Code)

Currency code of the invoice line item

quantity
integer (Quantity)

Quantity of bought items

description
string (Description)

Description of the invoice line item

period_start
string <date-time> (Period Start)

Start date (UTC) of the subscription period billed by this line item (only for subscription type)

period_end
string <date-time> (Period End)

End date (UTC) of the subscription period billed by this line item (only for subscription type)

proration_target_line_item_id
string (Proration Target Line Item Id)

In case this line item is a proration line item, the identifier of the original (positive) line item it applies on

object (Custom Properties)
Default: {}

Custom properties

Responses

Request samples

Content type
application/json
{
  • "id": "string",
  • "invoice_id": "string",
  • "subscription_id": "string",
  • "price_id": "string",
  • "type": "string",
  • "amount_excluding_tax_after_discount": 0,
  • "tax_amount": 0,
  • "discount_amount": 0,
  • "temporary_discount_amount": 0,
  • "currency_code": "string",
  • "quantity": 0,
  • "description": "string",
  • "period_start": "2019-08-24T14:15:22Z",
  • "period_end": "2019-08-24T14:15:22Z",
  • "proration_target_line_item_id": "string",
  • "custom_properties": { }
}

Response samples

Content type
application/json
{
  • "created_at": "2019-08-24T14:15:22Z",
  • "updated_at": "2019-08-24T14:15:22Z",
  • "id": "string",
  • "invoice_id": "string",
  • "subscription_id": "string",
  • "price_id": "string",
  • "type": "string",
  • "amount_excluding_tax_after_discount": 0,
  • "tax_amount": 0,
  • "discount_amount": 0,
  • "temporary_discount_amount": 0,
  • "currency_code": "string",
  • "quantity": 0,
  • "description": "string",
  • "period_start": "2019-08-24T14:15:22Z",
  • "period_end": "2019-08-24T14:15:22Z",
  • "proration_target_line_item_id": "string",
  • "custom_properties": { }
}

Credit Note Line Items

Retrieve A Credit Note Line Item By Id

Use this endpoint to retrieve a credit note line item by providing its id.

Authorizations:
APIKey
path Parameters
id
required
string (Id)

The id of the credit note line item to retrieve

Responses

Response samples

Content type
application/json
{
  • "created_at": "2019-08-24T14:15:22Z",
  • "updated_at": "2019-08-24T14:15:22Z",
  • "id": "string",
  • "credit_note_id": "string",
  • "invoice_line_item_id": "string",
  • "amount": 0,
  • "discount_amount": 0,
  • "temporary_discount_amount": 0,
  • "currency_code": "string",
  • "description": "string",
  • "custom_properties": { }
}

Delete A Credit Note Line Item By Id

Use this endpoint to delete a credit note line item by providing its id.

Authorizations:
APIKey
path Parameters
id
required
string (Id)

The id of the credit note line item to delete

Responses

Response samples

Content type
application/json
{
  • "detail": [
    ]
}

Update A Credit Note Line Item By Id

Use this endpoint to update a credit note line item by id. Partial updates are supported: only the fields specified in the request body will be updated. Custom properties are supported and can be set in the custom_properties (dictionary) inside the request body.

Authorizations:
APIKey
path Parameters
id
required
string (Id)

The id of the credit note line item to update

Request Body schema: application/json
required
id
string (Id)

Unique identifier for the credit note line item.

credit_note_id
string (Credit Note Id)

Identifier of the credit note to which the credit note line item belongs

invoice_line_item_id
string (Invoice Line Item Id)

Identifier of the invoice line item to which the credit note line item is attached

amount
number (Amount)

Amount of the credit note line item

discount_amount
number (Discount Amount)
Default: 0

Permanent discount amount of the credit note line item

temporary_discount_amount
number (Temporary Discount Amount)
Default: 0

Temporary discount amount of the credit note line item

currency_code
string (Currency Code)

Currency code of the credit note line item

description
string (Description)

Description of the credit note line item

object (Custom Properties)
Default: {}

Custom properties

Responses

Request samples

Content type
application/json
{
  • "id": "string",
  • "credit_note_id": "string",
  • "invoice_line_item_id": "string",
  • "amount": 0,
  • "discount_amount": 0,
  • "temporary_discount_amount": 0,
  • "currency_code": "string",
  • "description": "string",
  • "custom_properties": { }
}

Response samples

Content type
application/json
{
  • "created_at": "2019-08-24T14:15:22Z",
  • "updated_at": "2019-08-24T14:15:22Z",
  • "id": "string",
  • "credit_note_id": "string",
  • "invoice_line_item_id": "string",
  • "amount": 0,
  • "discount_amount": 0,
  • "temporary_discount_amount": 0,
  • "currency_code": "string",
  • "description": "string",
  • "custom_properties": { }
}

Create A New Credit Note Line Item

Use this endpoint to create a new credit note line item. Custom properties are supported and can be set in the custom_properties (dictionary) inside the request body.

Authorizations:
APIKey
Request Body schema: application/json
required
id
required
string (Id)

Unique identifier for the credit note line item.

credit_note_id
required
string (Credit Note Id)

Identifier of the credit note to which the credit note line item belongs

invoice_line_item_id
string (Invoice Line Item Id)

Identifier of the invoice line item to which the credit note line item is attached

amount
required
number (Amount)

Amount of the credit note line item

discount_amount
number (Discount Amount)
Default: 0

Permanent discount amount of the credit note line item

temporary_discount_amount
number (Temporary Discount Amount)
Default: 0

Temporary discount amount of the credit note line item

currency_code
required
string (Currency Code)

Currency code of the credit note line item

description
string (Description)

Description of the credit note line item

object (Custom Properties)
Default: {}

Custom properties

Responses

Request samples

Content type
application/json
{
  • "id": "string",
  • "credit_note_id": "string",
  • "invoice_line_item_id": "string",
  • "amount": 0,
  • "discount_amount": 0,
  • "temporary_discount_amount": 0,
  • "currency_code": "string",
  • "description": "string",
  • "custom_properties": { }
}

Response samples

Content type
application/json
{
  • "created_at": "2019-08-24T14:15:22Z",
  • "updated_at": "2019-08-24T14:15:22Z",
  • "id": "string",
  • "credit_note_id": "string",
  • "invoice_line_item_id": "string",
  • "amount": 0,
  • "discount_amount": 0,
  • "temporary_discount_amount": 0,
  • "currency_code": "string",
  • "description": "string",
  • "custom_properties": { }
}