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=426664290316977668
    

Response

        
          
          Status: 200 OK
        
      
[
  {
    "id": "426664290341094920",
    "administration_id": 123,
    "start_date": "2017-01-01",
    "end_date": null,
    "frequency": 1,
    "frequency_type": "month",
    "reference": null,
    "cancelled_at": null,
    "product_id": "426664290330609158",
    "product": {
      "id": "426664290330609158",
      "administration_id": 123,
      "description": "My product description",
      "title": null,
      "identifier": null,
      "price": "20.0",
      "currency": "EUR",
      "frequency": 1,
      "frequency_type": "month",
      "tax_rate_id": "426664036220798511",
      "ledger_account_id": "426664036164175387",
      "created_at": "2024-07-16T08:33:17.136Z",
      "updated_at": "2024-07-16T08:33:17.136Z"
    },
    "contact_id": "426664290316977668",
    "contact": {
      "id": "426664290316977668",
      "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": "2024-07-16T08:33:17.123Z",
      "updated_at": "2024-07-16T08:33:17.123Z",
      "version": 1721118797,
      "sales_invoices_url": "https://moneybird.dev/123/sales_invoices/e03e9b667937181f827b2cd6e124fef8c830a5efb832d8300be5bb51da820bd5/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": "426664290330609158",
        "product": {
          "id": "426664290330609158",
          "administration_id": 123,
          "description": "My product description",
          "title": null,
          "identifier": null,
          "price": "20.0",
          "currency": "EUR",
          "frequency": 1,
          "frequency_type": "month",
          "tax_rate_id": "426664036220798511",
          "ledger_account_id": "426664036164175387",
          "created_at": "2024-07-16T08:33:17.136Z",
          "updated_at": "2024-07-16T08:33:17.136Z"
        },
        "amount": "1 x",
        "discount": "0.0"
      }
    ],
    "recurring_sales_invoice_id": "426664290381989387"
  }
]
      

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

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

Should be a valid document style id.

subscription[frequency] Integer
subscription[frequency_type] String
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":"2024-07-17","contact_id":426664291639232053,"product_id":426664291667543607,"reference":"moneybird.nl","discount":10,"amount":"5x"}}' \
  https://moneybird.com/api/v2/123/subscriptions.json
    

Response

        
          
          Status: 201 Created
        
      
{
  "id": "426664291723118137",
  "administration_id": 123,
  "start_date": "2024-07-17",
  "end_date": null,
  "frequency": 1,
  "frequency_type": "month",
  "reference": "moneybird.nl",
  "cancelled_at": null,
  "product_id": "426664291667543607",
  "product": {
    "id": "426664291667543607",
    "administration_id": 123,
    "description": "My product description",
    "title": null,
    "identifier": null,
    "price": "20.0",
    "currency": "EUR",
    "frequency": 1,
    "frequency_type": "month",
    "tax_rate_id": "426664036220798511",
    "ledger_account_id": "426664036164175387",
    "created_at": "2024-07-16T08:33:18.411Z",
    "updated_at": "2024-07-16T08:33:18.411Z"
  },
  "contact_id": "426664291639232053",
  "contact": {
    "id": "426664291639232053",
    "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": "2024-07-16T08:33:18.384Z",
    "updated_at": "2024-07-16T08:33:18.384Z",
    "version": 1721118798,
    "sales_invoices_url": "https://moneybird.dev/123/sales_invoices/265308597c9237527480f3d8cf732479aaec4a7713439a9e0cec91b49fbf7c08/all",
    "notes": [

    ],
    "custom_fields": [

    ],
    "contact_people": [

    ],
    "archived": false
  },
  "contact_person_id": null,
  "contact_person": null,
  "subscription_products": [
    {
      "start_date": "2024-07-17",
      "end_date": null,
      "product_id": "426664291667543607",
      "product": {
        "id": "426664291667543607",
        "administration_id": 123,
        "description": "My product description",
        "title": null,
        "identifier": null,
        "price": "20.0",
        "currency": "EUR",
        "frequency": 1,
        "frequency_type": "month",
        "tax_rate_id": "426664036220798511",
        "ledger_account_id": "426664036164175387",
        "created_at": "2024-07-16T08:33:18.411Z",
        "updated_at": "2024-07-16T08:33:18.411Z"
      },
      "amount": "5x",
      "discount": "10.0"
    }
  ],
  "recurring_sales_invoice_id": "426664291757721148"
}
      

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/426664292059711060.json?
    

Response

        
          
          Status: 200 OK
        
      
{
  "id": "426664292059711060",
  "administration_id": 123,
  "start_date": "2017-01-01",
  "end_date": null,
  "frequency": 1,
  "frequency_type": "month",
  "reference": null,
  "cancelled_at": null,
  "product_id": "426664292049225298",
  "product": {
    "id": "426664292049225298",
    "administration_id": 123,
    "description": "My product description",
    "title": null,
    "identifier": null,
    "price": "20.0",
    "currency": "EUR",
    "frequency": 1,
    "frequency_type": "month",
    "tax_rate_id": "426664036220798511",
    "ledger_account_id": "426664036164175387",
    "created_at": "2024-07-16T08:33:18.776Z",
    "updated_at": "2024-07-16T08:33:18.776Z"
  },
  "contact_id": "426664292031399504",
  "contact": {
    "id": "426664292031399504",
    "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": "2024-07-16T08:33:18.757Z",
    "updated_at": "2024-07-16T08:33:18.757Z",
    "version": 1721118798,
    "sales_invoices_url": "https://moneybird.dev/123/sales_invoices/040d73afb0ffa08da58afb05e30fdc7269280fc59557be697816e8f50a8c6c06/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": "426664292049225298",
      "product": {
        "id": "426664292049225298",
        "administration_id": 123,
        "description": "My product description",
        "title": null,
        "identifier": null,
        "price": "20.0",
        "currency": "EUR",
        "frequency": 1,
        "frequency_type": "month",
        "tax_rate_id": "426664036220798511",
        "ledger_account_id": "426664036164175387",
        "created_at": "2024-07-16T08:33:18.776Z",
        "updated_at": "2024-07-16T08:33:18.776Z"
      },
      "amount": "1 x",
      "discount": "0.0"
    }
  ],
  "recurring_sales_invoice_id": "426664292093265495"
}
      

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":426664292855580270,"discount":10,"amount":"3 x"}}' \
  https://moneybird.com/api/v2/123/subscriptions/426664292892280438.json
    

Response

        
          
          Status: 200 OK
        
      
{
  "id": "426664292892280438",
  "administration_id": 123,
  "start_date": "2017-01-01",
  "end_date": null,
  "frequency": 1,
  "frequency_type": "month",
  "reference": null,
  "cancelled_at": null,
  "product_id": "426664292855580270",
  "product": {
    "id": "426664292855580270",
    "administration_id": 123,
    "description": "My product description",
    "title": null,
    "identifier": null,
    "price": "30.0",
    "currency": "EUR",
    "frequency": 1,
    "frequency_type": "month",
    "tax_rate_id": "426664036220798511",
    "ledger_account_id": "426664036164175387",
    "created_at": "2024-07-16T08:33:19.544Z",
    "updated_at": "2024-07-16T08:33:19.544Z"
  },
  "contact_id": "426664292870260338",
  "contact": {
    "id": "426664292870260338",
    "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": "2024-07-16T08:33:19.559Z",
    "updated_at": "2024-07-16T08:33:19.559Z",
    "version": 1721118799,
    "sales_invoices_url": "https://moneybird.dev/123/sales_invoices/6c62f3840e858988cf8eb50d024422874ec7fb5a45becf8b8024a468355915fb/all",
    "notes": [

    ],
    "custom_fields": [

    ],
    "contact_people": [

    ],
    "archived": false
  },
  "contact_person_id": null,
  "contact_person": null,
  "subscription_products": [
    {
      "start_date": "2017-01-01",
      "end_date": "2024-07-15",
      "product_id": "426664292880746100",
      "product": {
        "id": "426664292880746100",
        "administration_id": 123,
        "description": "My product description",
        "title": null,
        "identifier": null,
        "price": "20.0",
        "currency": "EUR",
        "frequency": 1,
        "frequency_type": "month",
        "tax_rate_id": "426664036220798511",
        "ledger_account_id": "426664036164175387",
        "created_at": "2024-07-16T08:33:19.569Z",
        "updated_at": "2024-07-16T08:33:19.569Z"
      },
      "amount": "1 x",
      "discount": "0.0"
    },
    {
      "start_date": "2024-07-16",
      "end_date": null,
      "product_id": "426664292855580270",
      "product": {
        "id": "426664292855580270",
        "administration_id": 123,
        "description": "My product description",
        "title": null,
        "identifier": null,
        "price": "30.0",
        "currency": "EUR",
        "frequency": 1,
        "frequency_type": "month",
        "tax_rate_id": "426664036220798511",
        "ledger_account_id": "426664036164175387",
        "created_at": "2024-07-16T08:33:19.544Z",
        "updated_at": "2024-07-16T08:33:19.544Z"
      },
      "amount": "3 x",
      "discount": "10.0"
    }
  ],
  "recurring_sales_invoice_id": "426664292924786297"
}
      

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":426664293702829707}}' \
  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":"2024-07-18"}}' \
  https://moneybird.com/api/v2/123/subscriptions/426664294458853042.json
    

Response

        
          
          Status: 200 OK
        
      
{
  "id": "426664294458853042",
  "administration_id": 123,
  "start_date": "2017-01-01",
  "end_date": "2024-07-18",
  "frequency": 1,
  "frequency_type": "month",
  "reference": null,
  "cancelled_at": "2024-07-16T08:33:21.548Z",
  "product_id": "426664294444172976",
  "product": {
    "id": "426664294444172976",
    "administration_id": 123,
    "description": "My product description",
    "title": null,
    "identifier": null,
    "price": "20.0",
    "currency": "EUR",
    "frequency": 1,
    "frequency_type": "month",
    "tax_rate_id": "426664036220798511",
    "ledger_account_id": "426664036164175387",
    "created_at": "2024-07-16T08:33:21.059Z",
    "updated_at": "2024-07-16T08:33:21.059Z"
  },
  "contact_id": "426664294425298606",
  "contact": {
    "id": "426664294425298606",
    "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": "2024-07-16T08:33:21.042Z",
    "updated_at": "2024-07-16T08:33:21.042Z",
    "version": 1721118801,
    "sales_invoices_url": "https://moneybird.dev/123/sales_invoices/aa700496c1008696e98529dc3e4e7b32addd7f151d51e7742a00847050bed7b6/all",
    "notes": [

    ],
    "custom_fields": [

    ],
    "contact_people": [

    ],
    "archived": false
  },
  "contact_person_id": null,
  "contact_person": null,
  "subscription_products": [
    {
      "start_date": "2017-01-01",
      "end_date": "2024-07-18",
      "product_id": "426664294444172976",
      "product": {
        "id": "426664294444172976",
        "administration_id": 123,
        "description": "My product description",
        "title": null,
        "identifier": null,
        "price": "20.0",
        "currency": "EUR",
        "frequency": 1,
        "frequency_type": "month",
        "tax_rate_id": "426664036220798511",
        "ledger_account_id": "426664036164175387",
        "created_at": "2024-07-16T08:33:21.059Z",
        "updated_at": "2024-07-16T08:33:21.059Z"
      },
      "amount": "1 x",
      "discount": "0.0"
    }
  ],
  "recurring_sales_invoice_id": "426664294495553205"
}
      

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/426664295734970078/create_and_schedule_one_off_sales_invoice.json
    

Response

        
          
          Status: 201 Created
        
      
{
  "id": "426664296496236267",
  "administration_id": 123,
  "contact_id": "426664295704561370",
  "contact": {
    "id": "426664295704561370",
    "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": "2024-07-16T08:33:22.246Z",
    "updated_at": "2024-07-16T08:33:22.246Z",
    "version": 1721118802,
    "sales_invoices_url": "https://moneybird.dev/123/sales_invoices/c593cbfbb32394b1d617f56e11adb9dffed1d411bb9e77da8ee8dbd0bb48fa7f/all",
    "notes": [

    ],
    "custom_fields": [

    ],
    "contact_people": [

    ],
    "archived": false
  },
  "contact_person_id": null,
  "contact_person": null,
  "invoice_id": null,
  "recurring_sales_invoice_id": null,
  "subscription_id": null,
  "workflow_id": "426664036392764982",
  "document_style_id": "426664036528031296",
  "identity_id": "426664036248061493",
  "draft_id": 2,
  "state": "scheduled",
  "invoice_date": "2024-08-01",
  "due_date": "2024-08-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": "2024-07-16T08:33:22.246Z",
  "updated_at": "2024-07-16T08:33:22.246Z",
  "public_view_code": null,
  "public_view_code_expires_at": null,
  "version": 1721118802,
  "details": [
    {
      "id": "426664296498333420",
      "administration_id": 123,
      "tax_rate_id": "426664036220798511",
      "ledger_account_id": "426664036164175387",
      "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": "2024-07-16T08:33:22.246Z",
      "updated_at": "2024-07-16T08:33:22.246Z"
    }
  ],
  "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/c78e7ba8755d92fe9bd7ee0f227ff25d95fb108b3d7fc2aa8d3d0dd9babdeecc/c593cbfbb32394b1d617f56e11adb9dffed1d411bb9e77da8ee8dbd0bb48fa7f",
  "payment_url": "http://moneybird.dev/123/online_sales_invoices/c78e7ba8755d92fe9bd7ee0f227ff25d95fb108b3d7fc2aa8d3d0dd9babdeecc/c593cbfbb32394b1d617f56e11adb9dffed1d411bb9e77da8ee8dbd0bb48fa7f/pay_invoice",
  "custom_fields": [

  ],
  "notes": [

  ],
  "attachments": [

  ],
  "events": [
    {
      "administration_id": 123,
      "user_id": 17211185545521,
      "action": "sales_invoice_created",
      "link_entity_id": null,
      "link_entity_type": null,
      "data": {
      },
      "created_at": "2024-07-16T08:33:22.246Z",
      "updated_at": "2024-07-16T08:33:22.246Z"
    },
    {
      "administration_id": 123,
      "user_id": 17211185545521,
      "action": "sales_invoice_state_changed_to_scheduled",
      "link_entity_id": null,
      "link_entity_type": null,
      "data": {
      },
      "created_at": "2024-07-16T08:33:22.246Z",
      "updated_at": "2024-07-16T08:33:22.246Z"
    }
  ],
  "tax_totals": [
    {
      "tax_rate_id": "426664036220798511",
      "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":426664297175713542,"amount":"5 x","price":100.0,"period":"20210601..20210630","description":"Transaction Costs"}' \
  https://moneybird.com/api/v2/123/subscriptions/426664297212413708/additional_charges
    

Response

        
          
          Status: 201 Created
        
      
{
  "id": "426664297907619609",
  "administration_id": 123,
  "contact_id": null,
  "subscription_id": "426664297212413708",
  "product_id": "426664297175713542",
  "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/426664297979971360/additional_charges.json?
    

Response

        
          
          Status: 200 OK
        
      
[
  {
    "id": "426664298213803823",
    "administration_id": 123,
    "contact_id": null,
    "subscription_id": "426664297979971360",
    "product_id": "426664298204366637",
    "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/426664300543739788/additional_charges.json?include_billed=true
    

Response

        
          
          Status: 200 OK
        
      
[
  {
    "id": "426664300961073051",
    "administration_id": 123,
    "contact_id": null,
    "subscription_id": "426664300543739788",
    "product_id": "426664300930664345",
    "detail_id": null,
    "amount": "5 x",
    "price": "100.0",
    "period": "202106..202106",
    "description": "Transaction Costs"
  },
  {
    "id": "426664301039716254",
    "administration_id": 123,
    "contact_id": null,
    "subscription_id": "426664300543739788",
    "product_id": "426664300988336028",
    "detail_id": "426664301206439840",
    "amount": "5 x",
    "price": "100.0",
    "period": "202106..202106",
    "description": "Transaction Costs"
  }
]