Subscriptions

List all subscriptions

Lists all subscriptions for the given contact.

Parameters

Parameter Type Description
contact_id Integer

Required

Example: lists all subscriptions for a contact

Request

curl -s -H "Content-Type: application/json" -H "Authorization: Bearer 84ec207ad0154a508f798e615a998ac1fd752926d00f955fb1df3e144cba44ab" \
  -XGET \
  https://moneybird.com/api/v2/123/subscriptions.json?contact_id=407012655268628187
    

Response

        
          
          Status: 200 OK
        
      
[
  {
    "id": "407012655304279775",
    "administration_id": 123,
    "start_date": "2017-01-01",
    "end_date": null,
    "frequency": 1,
    "frequency_type": "month",
    "reference": null,
    "cancelled_at": null,
    "product_id": "407012655287502557",
    "product": {
      "id": "407012655287502557",
      "administration_id": 123,
      "description": "My product description",
      "title": null,
      "identifier": null,
      "price": "20.0",
      "currency": "EUR",
      "frequency": 1,
      "frequency_type": "month",
      "tax_rate_id": "407012429954811583",
      "ledger_account_id": "407012429891897003",
      "created_at": "2023-12-12T10:38:57.520Z",
      "updated_at": "2023-12-12T10:38:57.520Z"
    },
    "contact_id": "407012655268628187",
    "contact": {
      "id": "407012655268628187",
      "administration_id": 123,
      "company_name": "Foobar Holding B.V.",
      "firstname": "",
      "lastname": "",
      "address1": "Hoofdstraat 12",
      "address2": "",
      "zipcode": "1234AB",
      "city": "Amsterdam",
      "country": "NL",
      "phone": "",
      "delivery_method": "Email",
      "customer_id": "1",
      "tax_number": "",
      "chamber_of_commerce": "",
      "bank_account": "",
      "attention": "",
      "email": "info@example.com",
      "email_ubl": true,
      "send_invoices_to_attention": "",
      "send_invoices_to_email": "info@example.com",
      "send_estimates_to_attention": "",
      "send_estimates_to_email": "info@example.com",
      "sepa_active": false,
      "sepa_iban": "",
      "sepa_iban_account_name": "",
      "sepa_bic": "",
      "sepa_mandate_id": "",
      "sepa_mandate_date": null,
      "sepa_sequence_type": "RCUR",
      "credit_card_number": "",
      "credit_card_reference": "",
      "credit_card_type": null,
      "tax_number_validated_at": null,
      "tax_number_valid": null,
      "invoice_workflow_id": null,
      "estimate_workflow_id": null,
      "si_identifier": "",
      "si_identifier_type": null,
      "moneybird_payments_mandate": false,
      "created_at": "2023-12-12T10:38:57.502Z",
      "updated_at": "2023-12-12T10:38:57.502Z",
      "version": 1702377537,
      "sales_invoices_url": "https://moneybird.dev/123/sales_invoices/d4d28f229dd1e3dcf494e06702099960475c42b965699366f8844d6b37e37277/all",
      "notes": [

      ],
      "custom_fields": [

      ],
      "contact_people": [

      ],
      "archived": false
    },
    "contact_person_id": null,
    "contact_person": null,
    "subscription_products": [
      {
        "start_date": "2017-01-01",
        "end_date": null,
        "product_id": "407012655287502557",
        "product": {
          "id": "407012655287502557",
          "administration_id": 123,
          "description": "My product description",
          "title": null,
          "identifier": null,
          "price": "20.0",
          "currency": "EUR",
          "frequency": 1,
          "frequency_type": "month",
          "tax_rate_id": "407012429954811583",
          "ledger_account_id": "407012429891897003",
          "created_at": "2023-12-12T10:38:57.520Z",
          "updated_at": "2023-12-12T10:38:57.520Z"
        },
        "amount": "1 x",
        "discount": "0.0"
      }
    ],
    "recurring_sales_invoice_id": "407012655366145762"
  }
]
      

Create a new subscription

Starts a new subscription for the given contact. The product_id points to a product with a frequency, price and description. A recurring sales invoice is automatically created to bill the contact for the given frequency. The first invoice will be sent on the start date, but no sooner than tomorrow. The reference will be added to the sales invoices.

Optionally you can create a subscription with a different frequency than stored in the product. Make sure the frequency of the product and the provided frequency are compatible. E.g. you can bill a monthly product yearly.

Parameters

Parameter Type Description
subscription[start_date] Date

Required

subscription[product_id] Integer

Required

Should be a valid product id.

subscription[amount] String
subscription[discount] Decimal

Both a decimal and a string ‘10,95’ are accepted.

subscription[contact_id] Integer

Required

Should be a valid contact id.

subscription[contact_person_id] Integer

Should be a valid contact person id.

subscription[end_date] Date
subscription[reference] String
subscription[document_style_id] Integer

Required

Should be a valid document style id.

subscription[frequency] Integer
subscription[frequency_type] String

Can be day, week, month, quarter or year.

subscription[mergeable] Boolean
subscription[prices_are_incl_tax] Boolean

Example: creates a new subscription for the contact

Request

curl -s -H "Content-Type: application/json" -H "Authorization: Bearer 84ec207ad0154a508f798e615a998ac1fd752926d00f955fb1df3e144cba44ab" \
  -XPOST \
  -d '{"subscription":{"start_date":"2023-12-13","contact_id":407012656396896012,"product_id":407012656416818958,"reference":"moneybird.nl","discount":10,"amount":"5x"}}' \
  https://moneybird.com/api/v2/123/subscriptions.json
    

Response

        
          
          Status: 201 Created
        
      
{
  "id": "407012656466102032",
  "administration_id": 123,
  "start_date": "2023-12-13",
  "end_date": null,
  "frequency": 1,
  "frequency_type": "month",
  "reference": "moneybird.nl",
  "cancelled_at": null,
  "product_id": "407012656416818958",
  "product": {
    "id": "407012656416818958",
    "administration_id": 123,
    "description": "My product description",
    "title": null,
    "identifier": null,
    "price": "20.0",
    "currency": "EUR",
    "frequency": 1,
    "frequency_type": "month",
    "tax_rate_id": "407012429954811583",
    "ledger_account_id": "407012429891897003",
    "created_at": "2023-12-12T10:38:58.597Z",
    "updated_at": "2023-12-12T10:38:58.597Z"
  },
  "contact_id": "407012656396896012",
  "contact": {
    "id": "407012656396896012",
    "administration_id": 123,
    "company_name": "Foobar Holding B.V.",
    "firstname": "",
    "lastname": "",
    "address1": "Hoofdstraat 12",
    "address2": "",
    "zipcode": "1234AB",
    "city": "Amsterdam",
    "country": "NL",
    "phone": "",
    "delivery_method": "Email",
    "customer_id": "1",
    "tax_number": "",
    "chamber_of_commerce": "",
    "bank_account": "",
    "attention": "",
    "email": "info@example.com",
    "email_ubl": true,
    "send_invoices_to_attention": "",
    "send_invoices_to_email": "info@example.com",
    "send_estimates_to_attention": "",
    "send_estimates_to_email": "info@example.com",
    "sepa_active": false,
    "sepa_iban": "",
    "sepa_iban_account_name": "",
    "sepa_bic": "",
    "sepa_mandate_id": "",
    "sepa_mandate_date": null,
    "sepa_sequence_type": "RCUR",
    "credit_card_number": "",
    "credit_card_reference": "",
    "credit_card_type": null,
    "tax_number_validated_at": null,
    "tax_number_valid": null,
    "invoice_workflow_id": null,
    "estimate_workflow_id": null,
    "si_identifier": "",
    "si_identifier_type": null,
    "moneybird_payments_mandate": false,
    "created_at": "2023-12-12T10:38:58.577Z",
    "updated_at": "2023-12-12T10:38:58.577Z",
    "version": 1702377538,
    "sales_invoices_url": "https://moneybird.dev/123/sales_invoices/88e8634d0c853ccd89f659ddf7c9f1253cc15d5cee9759bcc77752dcf38db7e2/all",
    "notes": [

    ],
    "custom_fields": [

    ],
    "contact_people": [

    ],
    "archived": false
  },
  "contact_person_id": null,
  "contact_person": null,
  "subscription_products": [
    {
      "start_date": "2023-12-13",
      "end_date": null,
      "product_id": "407012656416818958",
      "product": {
        "id": "407012656416818958",
        "administration_id": 123,
        "description": "My product description",
        "title": null,
        "identifier": null,
        "price": "20.0",
        "currency": "EUR",
        "frequency": 1,
        "frequency_type": "month",
        "tax_rate_id": "407012429954811583",
        "ledger_account_id": "407012429891897003",
        "created_at": "2023-12-12T10:38:58.597Z",
        "updated_at": "2023-12-12T10:38:58.597Z"
      },
      "amount": "5x",
      "discount": "10.0"
    }
  ],
  "recurring_sales_invoice_id": "407012656495462163"
}
      

Get subscription

Get a subscription.

Example: returns a subscription

Request

curl -s -H "Content-Type: application/json" -H "Authorization: Bearer 84ec207ad0154a508f798e615a998ac1fd752926d00f955fb1df3e144cba44ab" \
  -XGET \
  https://moneybird.com/api/v2/123/subscriptions/407012656793257771.json?
    

Response

        
          
          Status: 200 OK
        
      
{
  "id": "407012656793257771",
  "administration_id": 123,
  "start_date": "2017-01-01",
  "end_date": null,
  "frequency": 1,
  "frequency_type": "month",
  "reference": null,
  "cancelled_at": null,
  "product_id": "407012656779626281",
  "product": {
    "id": "407012656779626281",
    "administration_id": 123,
    "description": "My product description",
    "title": null,
    "identifier": null,
    "price": "20.0",
    "currency": "EUR",
    "frequency": 1,
    "frequency_type": "month",
    "tax_rate_id": "407012429954811583",
    "ledger_account_id": "407012429891897003",
    "created_at": "2023-12-12T10:38:58.943Z",
    "updated_at": "2023-12-12T10:38:58.943Z"
  },
  "contact_id": "407012656762849063",
  "contact": {
    "id": "407012656762849063",
    "administration_id": 123,
    "company_name": "Foobar Holding B.V.",
    "firstname": "",
    "lastname": "",
    "address1": "Hoofdstraat 12",
    "address2": "",
    "zipcode": "1234AB",
    "city": "Amsterdam",
    "country": "NL",
    "phone": "",
    "delivery_method": "Email",
    "customer_id": "1",
    "tax_number": "",
    "chamber_of_commerce": "",
    "bank_account": "",
    "attention": "",
    "email": "info@example.com",
    "email_ubl": true,
    "send_invoices_to_attention": "",
    "send_invoices_to_email": "info@example.com",
    "send_estimates_to_attention": "",
    "send_estimates_to_email": "info@example.com",
    "sepa_active": false,
    "sepa_iban": "",
    "sepa_iban_account_name": "",
    "sepa_bic": "",
    "sepa_mandate_id": "",
    "sepa_mandate_date": null,
    "sepa_sequence_type": "RCUR",
    "credit_card_number": "",
    "credit_card_reference": "",
    "credit_card_type": null,
    "tax_number_validated_at": null,
    "tax_number_valid": null,
    "invoice_workflow_id": null,
    "estimate_workflow_id": null,
    "si_identifier": "",
    "si_identifier_type": null,
    "moneybird_payments_mandate": false,
    "created_at": "2023-12-12T10:38:58.927Z",
    "updated_at": "2023-12-12T10:38:58.927Z",
    "version": 1702377538,
    "sales_invoices_url": "https://moneybird.dev/123/sales_invoices/875d491378d0ab7085bb94dc1207dd8aee407b7148b0bbc165b3cf2beb1e5982/all",
    "notes": [

    ],
    "custom_fields": [

    ],
    "contact_people": [

    ],
    "archived": false
  },
  "contact_person_id": null,
  "contact_person": null,
  "subscription_products": [
    {
      "start_date": "2017-01-01",
      "end_date": null,
      "product_id": "407012656779626281",
      "product": {
        "id": "407012656779626281",
        "administration_id": 123,
        "description": "My product description",
        "title": null,
        "identifier": null,
        "price": "20.0",
        "currency": "EUR",
        "frequency": 1,
        "frequency_type": "month",
        "tax_rate_id": "407012429954811583",
        "ledger_account_id": "407012429891897003",
        "created_at": "2023-12-12T10:38:58.943Z",
        "updated_at": "2023-12-12T10:38:58.943Z"
      },
      "amount": "1 x",
      "discount": "0.0"
    }
  ],
  "recurring_sales_invoice_id": "407012656825763630"
}
      

Example: returns 404 when the subscription does not exist

Request

curl -s -H "Content-Type: application/json" -H "Authorization: Bearer 84ec207ad0154a508f798e615a998ac1fd752926d00f955fb1df3e144cba44ab" \
  -XGET \
  https://moneybird.com/api/v2/123/subscriptions/12345.json?
    

Response

        
          
          Status: 404 Not Found
        
      
{
  "error": "record not found",
  "symbolic": {
    "id": "not_found"
  }
}
      

Update a subscription

Updates the product the contact is subscribed to. This will automatically calculate the differences between the product prices and create a one off sales invoice to bill the extra charge for the remaining billing period.

Optionally you can provide a start date for the product change to become active.

Parameters

Parameter Type Description
subscription[contact_person_id] String

Should be a valid contact person id.

subscription[document_style_id] Integer

Should be a valid document style id.

subscription[reference] String
subscription[mergeable] Boolean
subscription[prices_are_incl_tax] Boolean
subscription[product_id] Integer

Should be a valid product id.

subscription[start_date] Date
subscription[amount] String
subscription[discount] Decimal

Both a decimal and a string ‘10,95’ are accepted.

Example: updates a subscription

Request

curl -s -H "Content-Type: application/json" -H "Authorization: Bearer 84ec207ad0154a508f798e615a998ac1fd752926d00f955fb1df3e144cba44ab" \
  -XPATCH \
  -d '{"subscription":{"product_id":407012657505240901,"discount":10,"amount":"3 x"}}' \
  https://moneybird.com/api/v2/123/subscriptions/407012657572349773.json
    

Response

        
          
          Status: 200 OK
        
      
{
  "id": "407012657572349773",
  "administration_id": 123,
  "start_date": "2017-01-01",
  "end_date": null,
  "frequency": 1,
  "frequency_type": "month",
  "reference": null,
  "cancelled_at": null,
  "product_id": "407012657505240901",
  "product": {
    "id": "407012657505240901",
    "administration_id": 123,
    "description": "My product description",
    "title": null,
    "identifier": null,
    "price": "30.0",
    "currency": "EUR",
    "frequency": 1,
    "frequency_type": "month",
    "tax_rate_id": "407012429954811583",
    "ledger_account_id": "407012429891897003",
    "created_at": "2023-12-12T10:38:59.634Z",
    "updated_at": "2023-12-12T10:38:59.634Z"
  },
  "contact_id": "407012657539843913",
  "contact": {
    "id": "407012657539843913",
    "administration_id": 123,
    "company_name": "Foobar Holding B.V.",
    "firstname": "",
    "lastname": "",
    "address1": "Hoofdstraat 12",
    "address2": "",
    "zipcode": "1234AB",
    "city": "Amsterdam",
    "country": "NL",
    "phone": "",
    "delivery_method": "Email",
    "customer_id": "1",
    "tax_number": "",
    "chamber_of_commerce": "",
    "bank_account": "",
    "attention": "",
    "email": "info@example.com",
    "email_ubl": true,
    "send_invoices_to_attention": "",
    "send_invoices_to_email": "info@example.com",
    "send_estimates_to_attention": "",
    "send_estimates_to_email": "info@example.com",
    "sepa_active": false,
    "sepa_iban": "",
    "sepa_iban_account_name": "",
    "sepa_bic": "",
    "sepa_mandate_id": "",
    "sepa_mandate_date": null,
    "sepa_sequence_type": "RCUR",
    "credit_card_number": "",
    "credit_card_reference": "",
    "credit_card_type": null,
    "tax_number_validated_at": null,
    "tax_number_valid": null,
    "invoice_workflow_id": null,
    "estimate_workflow_id": null,
    "si_identifier": "",
    "si_identifier_type": null,
    "moneybird_payments_mandate": false,
    "created_at": "2023-12-12T10:38:59.667Z",
    "updated_at": "2023-12-12T10:38:59.667Z",
    "version": 1702377539,
    "sales_invoices_url": "https://moneybird.dev/123/sales_invoices/ed5d5ae77dfb60c00f82f8d73519877d837a63e08c8fbfade200d55849409ebf/all",
    "notes": [

    ],
    "custom_fields": [

    ],
    "contact_people": [

    ],
    "archived": false
  },
  "contact_person_id": null,
  "contact_person": null,
  "subscription_products": [
    {
      "start_date": "2017-01-01",
      "end_date": "2023-12-11",
      "product_id": "407012657558718283",
      "product": {
        "id": "407012657558718283",
        "administration_id": 123,
        "description": "My product description",
        "title": null,
        "identifier": null,
        "price": "20.0",
        "currency": "EUR",
        "frequency": 1,
        "frequency_type": "month",
        "tax_rate_id": "407012429954811583",
        "ledger_account_id": "407012429891897003",
        "created_at": "2023-12-12T10:38:59.685Z",
        "updated_at": "2023-12-12T10:38:59.685Z"
      },
      "amount": "1 x",
      "discount": "0.0"
    },
    {
      "start_date": "2023-12-12",
      "end_date": null,
      "product_id": "407012657505240901",
      "product": {
        "id": "407012657505240901",
        "administration_id": 123,
        "description": "My product description",
        "title": null,
        "identifier": null,
        "price": "30.0",
        "currency": "EUR",
        "frequency": 1,
        "frequency_type": "month",
        "tax_rate_id": "407012429954811583",
        "ledger_account_id": "407012429891897003",
        "created_at": "2023-12-12T10:38:59.634Z",
        "updated_at": "2023-12-12T10:38:59.634Z"
      },
      "amount": "3 x",
      "discount": "10.0"
    }
  ],
  "recurring_sales_invoice_id": "407012657610098512"
}
      

Example: returns a 404 if the subscription couldn't be found

Request

curl -s -H "Content-Type: application/json" -H "Authorization: Bearer 84ec207ad0154a508f798e615a998ac1fd752926d00f955fb1df3e144cba44ab" \
  -XPATCH \
  -d '{"subscription":{"product_id":407012658373461858}}' \
  https://moneybird.com/api/v2/123/subscriptions/0.json
    

Response

        
          
          Status: 404 Not Found
        
      
{
  "error": "record not found",
  "symbolic": {
    "id": "not_found"
  }
}
      

Cancel a subscription

Cancels the subscription. Stops the recurring sales invoice for the contact. Optionally you can provide an end_date to stop the subscription on a future date.

Parameters

Parameter Type Description
subscription[end_date] Date

Example: cancels a subscription for the contact

Request

curl -s -H "Content-Type: application/json" -H "Authorization: Bearer 84ec207ad0154a508f798e615a998ac1fd752926d00f955fb1df3e144cba44ab" \
  -XDELETE \
  -d '{"subscription":{"end_date":"2023-12-14"}}' \
  https://moneybird.com/api/v2/123/subscriptions/407012659450349449.json
    

Response

        
          
          Status: 200 OK
        
      
{
  "id": "407012659450349449",
  "administration_id": 123,
  "start_date": "2017-01-01",
  "end_date": "2023-12-14",
  "frequency": 1,
  "frequency_type": "month",
  "reference": null,
  "cancelled_at": "2023-12-12T10:39:02.077Z",
  "product_id": "407012659431475079",
  "product": {
    "id": "407012659431475079",
    "administration_id": 123,
    "description": "My product description",
    "title": null,
    "identifier": null,
    "price": "20.0",
    "currency": "EUR",
    "frequency": 1,
    "frequency_type": "month",
    "tax_rate_id": "407012429954811583",
    "ledger_account_id": "407012429891897003",
    "created_at": "2023-12-12T10:39:01.472Z",
    "updated_at": "2023-12-12T10:39:01.472Z"
  },
  "contact_id": "407012659409454981",
  "contact": {
    "id": "407012659409454981",
    "administration_id": 123,
    "company_name": "Foobar Holding B.V.",
    "firstname": "",
    "lastname": "",
    "address1": "Hoofdstraat 12",
    "address2": "",
    "zipcode": "1234AB",
    "city": "Amsterdam",
    "country": "NL",
    "phone": "",
    "delivery_method": "Email",
    "customer_id": "1",
    "tax_number": "",
    "chamber_of_commerce": "",
    "bank_account": "",
    "attention": "",
    "email": "info@example.com",
    "email_ubl": true,
    "send_invoices_to_attention": "",
    "send_invoices_to_email": "info@example.com",
    "send_estimates_to_attention": "",
    "send_estimates_to_email": "info@example.com",
    "sepa_active": false,
    "sepa_iban": "",
    "sepa_iban_account_name": "",
    "sepa_bic": "",
    "sepa_mandate_id": "",
    "sepa_mandate_date": null,
    "sepa_sequence_type": "RCUR",
    "credit_card_number": "",
    "credit_card_reference": "",
    "credit_card_type": null,
    "tax_number_validated_at": null,
    "tax_number_valid": null,
    "invoice_workflow_id": null,
    "estimate_workflow_id": null,
    "si_identifier": "",
    "si_identifier_type": null,
    "moneybird_payments_mandate": false,
    "created_at": "2023-12-12T10:39:01.451Z",
    "updated_at": "2023-12-12T10:39:01.451Z",
    "version": 1702377541,
    "sales_invoices_url": "https://moneybird.dev/123/sales_invoices/2fb0f825226585a86397fdb7379226af02783224b48af8c4bc72ee252bf54ca8/all",
    "notes": [

    ],
    "custom_fields": [

    ],
    "contact_people": [

    ],
    "archived": false
  },
  "contact_person_id": null,
  "contact_person": null,
  "subscription_products": [
    {
      "start_date": "2017-01-01",
      "end_date": "2023-12-14",
      "product_id": "407012659431475079",
      "product": {
        "id": "407012659431475079",
        "administration_id": 123,
        "description": "My product description",
        "title": null,
        "identifier": null,
        "price": "20.0",
        "currency": "EUR",
        "frequency": 1,
        "frequency_type": "month",
        "tax_rate_id": "407012429954811583",
        "ledger_account_id": "407012429891897003",
        "created_at": "2023-12-12T10:39:01.472Z",
        "updated_at": "2023-12-12T10:39:01.472Z"
      },
      "amount": "1 x",
      "discount": "0.0"
    }
  ],
  "recurring_sales_invoice_id": "407012659508021132"
}
      

Create and schedule an invoice to be sent together with the subscription

Besides the recurring sales invoice for the subscription, you sometimes need to bill separate costs like usage based charges. Ideally you want these costs to be on the same invoice as the subscription invoice. This endpoint allows you to put extra invoice details on the subscription invoice.

This endpoint creates a new sales invoice and schedules it for sending on the same date as the next subscription invoice. During sending, Moneybird will merge both the scheduled invoice and the subscription invoice. This means the contact will receive one sales invoice with multiple invoice details, both from the subscription and from the one off sales invoice.

Parameters

Parameter Type Description
sales_invoice[details_attributes][description] String
sales_invoice[details_attributes][period] String

String with a date range: 20140101..20141231, presets are also allowed: this_month, prev_month, next_month, etc.

sales_invoice[details_attributes][price] Decimal

Both a decimal and a string ‘10,95’ are accepted.

sales_invoice[details_attributes][amount] String
sales_invoice[details_attributes][tax_rate_id] Integer

Should be a valid tax rate id.

sales_invoice[details_attributes][ledger_account_id] Integer

Should be a valid ledger account id.

sales_invoice[details_attributes][product_id] Integer

Should be a valid product id.

sales_invoice[details_attributes][row_order] Integer
sales_invoice[invoice_date] Date

Example: creates a sales invoice

Request

curl -s -H "Content-Type: application/json" -H "Authorization: Bearer 84ec207ad0154a508f798e615a998ac1fd752926d00f955fb1df3e144cba44ab" \
  -XPOST \
  -d '{"sales_invoice":{"details_attributes":{"0":{"description":"Extra costs subscription","price":"10.5"}}}}' \
  https://moneybird.com/api/v2/123/subscriptions/407012661253900213/create_and_schedule_one_off_sales_invoice.json
    

Response

        
          
          Status: 201 Created
        
      
{
  "id": "407012661765605314",
  "administration_id": 123,
  "contact_id": "407012661214054321",
  "contact": {
    "id": "407012661214054321",
    "administration_id": 123,
    "company_name": "Foobar Holding B.V.",
    "firstname": "",
    "lastname": "",
    "address1": "Hoofdstraat 12",
    "address2": "",
    "zipcode": "1234AB",
    "city": "Amsterdam",
    "country": "NL",
    "phone": "",
    "delivery_method": "Email",
    "customer_id": "1",
    "tax_number": "",
    "chamber_of_commerce": "",
    "bank_account": "",
    "attention": "",
    "email": "info@example.com",
    "email_ubl": true,
    "send_invoices_to_attention": "",
    "send_invoices_to_email": "info@example.com",
    "send_estimates_to_attention": "",
    "send_estimates_to_email": "info@example.com",
    "sepa_active": false,
    "sepa_iban": "",
    "sepa_iban_account_name": "",
    "sepa_bic": "",
    "sepa_mandate_id": "",
    "sepa_mandate_date": null,
    "sepa_sequence_type": "RCUR",
    "credit_card_number": "",
    "credit_card_reference": "",
    "credit_card_type": null,
    "tax_number_validated_at": null,
    "tax_number_valid": null,
    "invoice_workflow_id": null,
    "estimate_workflow_id": null,
    "si_identifier": "",
    "si_identifier_type": null,
    "moneybird_payments_mandate": false,
    "created_at": "2023-12-12T10:39:03.159Z",
    "updated_at": "2023-12-12T10:39:03.159Z",
    "version": 1702377543,
    "sales_invoices_url": "https://moneybird.dev/123/sales_invoices/75093196b0b5ea5d87e607270b2a798190c70cf43cfc745d1dbaae0e1d27583a/all",
    "notes": [

    ],
    "custom_fields": [

    ],
    "contact_people": [

    ],
    "archived": false
  },
  "contact_person_id": null,
  "contact_person": null,
  "invoice_id": null,
  "recurring_sales_invoice_id": null,
  "workflow_id": "407012430210664134",
  "document_style_id": "407012430377387728",
  "identity_id": "407012429988366021",
  "draft_id": 2,
  "state": "scheduled",
  "invoice_date": "2024-01-01",
  "due_date": "2024-01-15",
  "payment_conditions": "We verzoeken u vriendelijk het bovenstaande bedrag van {document.total_price} voor {document.due_date} te voldoen op onze bankrekening onder vermelding van de omschrijving {document.payment_reference}. Voor vragen kunt u contact opnemen per e-mail.",
  "payment_reference": null,
  "short_payment_reference": null,
  "reference": null,
  "language": "nl",
  "currency": "EUR",
  "discount": "0.0",
  "original_sales_invoice_id": null,
  "paused": false,
  "paid_at": null,
  "sent_at": null,
  "created_at": "2023-12-12T10:39:03.159Z",
  "updated_at": "2023-12-12T10:39:03.159Z",
  "public_view_code": null,
  "public_view_code_expires_at": null,
  "version": 1702377543,
  "details": [
    {
      "id": "407012661768751043",
      "administration_id": 123,
      "tax_rate_id": "407012429954811583",
      "ledger_account_id": "407012429891897003",
      "project_id": null,
      "product_id": null,
      "amount": null,
      "amount_decimal": "1.0",
      "description": "Extra costs subscription",
      "price": "10.5",
      "period": null,
      "row_order": 0,
      "total_price_excl_tax_with_discount": "10.5",
      "total_price_excl_tax_with_discount_base": "10.5",
      "tax_report_reference": [
        "NL/1a"
      ],
      "mandatory_tax_text": null,
      "created_at": "2023-12-12T10:39:03.159Z",
      "updated_at": "2023-12-12T10:39:03.159Z"
    }
  ],
  "payments": [

  ],
  "total_paid": "0.0",
  "total_unpaid": "12.71",
  "total_unpaid_base": "12.71",
  "prices_are_incl_tax": false,
  "total_price_excl_tax": "10.5",
  "total_price_excl_tax_base": "10.5",
  "total_price_incl_tax": "12.71",
  "total_price_incl_tax_base": "12.71",
  "total_discount": "0.0",
  "marked_dubious_on": null,
  "marked_uncollectible_on": null,
  "reminder_count": 0,
  "next_reminder": null,
  "original_estimate_id": null,
  "url": "http://moneybird.dev/123/sales_invoices/519580ba3d41072991bf0419e573c719e68c5eacffa08aff43c81a11589fa353/75093196b0b5ea5d87e607270b2a798190c70cf43cfc745d1dbaae0e1d27583a",
  "payment_url": "http://moneybird.dev/123/online_sales_invoices/519580ba3d41072991bf0419e573c719e68c5eacffa08aff43c81a11589fa353/75093196b0b5ea5d87e607270b2a798190c70cf43cfc745d1dbaae0e1d27583a/pay_invoice",
  "custom_fields": [

  ],
  "notes": [

  ],
  "attachments": [

  ],
  "events": [
    {
      "administration_id": 123,
      "user_id": 17023773225870,
      "action": "sales_invoice_created",
      "link_entity_id": null,
      "link_entity_type": null,
      "data": {
      },
      "created_at": "2023-12-12T10:39:03.159Z",
      "updated_at": "2023-12-12T10:39:03.159Z"
    },
    {
      "administration_id": 123,
      "user_id": 17023773225870,
      "action": "sales_invoice_state_changed_to_scheduled",
      "link_entity_id": null,
      "link_entity_type": null,
      "data": {
      },
      "created_at": "2023-12-12T10:39:03.159Z",
      "updated_at": "2023-12-12T10:39:03.159Z"
    }
  ],
  "tax_totals": [
    {
      "tax_rate_id": "407012429954811583",
      "taxable_amount": "10.5",
      "taxable_amount_base": "10.5",
      "tax_amount": "2.21",
      "tax_amount_base": "2.21"
    }
  ]
}
      

Create an additional charge to be invoiced together with the subscription

At the end of the current subscription period, the additional charges are merged where possible and an invoice will be created for them. The invoice will be scheduled for sending together with the subscription invoice, so that they are merged on sending.

Example: create a usage charge

Request

curl -s -H "Content-Type: application/json" -H "Authorization: Bearer 84ec207ad0154a508f798e615a998ac1fd752926d00f955fb1df3e144cba44ab" \
  -XPOST \
  -d '{"product_id":407012662431451101,"amount":"5 x","price":100.0,"period":"20210601..20210630","description":"Transaction Costs"}' \
  https://moneybird.com/api/v2/123/subscriptions/407012662469199843/additional_charges
    

Response

        
          
          Status: 201 Created
        
      
{
  "id": "407012663001876464",
  "administration_id": 123,
  "contact_id": null,
  "subscription_id": "407012662469199843",
  "product_id": "407012662431451101",
  "detail_id": null,
  "amount": "5 x",
  "price": "100.0",
  "period": "202106..202106",
  "description": "Transaction Costs"
}
      

Get additional charges

Get the additional charges of the given subscription.

Parameters

Parameter Type Description
include_billed Boolean

If true, includes the additional charges that have already been billed. Default is false.

Example: views additional charges of a subscription

Request

curl -s -H "Content-Type: application/json" -H "Authorization: Bearer 84ec207ad0154a508f798e615a998ac1fd752926d00f955fb1df3e144cba44ab" \
  -XGET \
  https://moneybird.com/api/v2/123/subscriptions/407012663118268407/additional_charges.json?
    

Response

        
          
          Status: 200 OK
        
      
[
  {
    "id": "407012663425500166",
    "administration_id": 123,
    "contact_id": null,
    "subscription_id": "407012663118268407",
    "product_id": "407012663401382916",
    "detail_id": null,
    "amount": "5 x",
    "price": "100.0",
    "period": "202106..202106",
    "description": "Transaction Costs"
  }
]
      

Example: does return billed additional charges if include_billed is true

Request

curl -s -H "Content-Type: application/json" -H "Authorization: Bearer 84ec207ad0154a508f798e615a998ac1fd752926d00f955fb1df3e144cba44ab" \
  -XGET \
  https://moneybird.com/api/v2/123/subscriptions/407012666560742499/additional_charges.json?include_billed=true
    

Response

        
          
          Status: 200 OK
        
      
[
  {
    "id": "407012667048330354",
    "administration_id": 123,
    "contact_id": null,
    "subscription_id": "407012666560742499",
    "product_id": "407012667026310256",
    "detail_id": null,
    "amount": "5 x",
    "price": "100.0",
    "period": "202106..202106",
    "description": "Transaction Costs"
  },
  {
    "id": "407012667087127669",
    "administration_id": 123,
    "contact_id": null,
    "subscription_id": "407012666560742499",
    "product_id": "407012667065107571",
    "detail_id": "407012667209811063",
    "amount": "5 x",
    "price": "100.0",
    "period": "202106..202106",
    "description": "Transaction Costs"
  }
]