New

Just launched: Vueblocks, a brand-new search engine for Vue packages! Explore Vueblocks →

kfoobar/laravel-fortnox

Fortnox API Client for Laravel
1,916
Install
composer require kfoobar/laravel-fortnox
Latest Version:v0.2.0
PHP:^8
Laravel:8 – 13
Older releases:6 · 7
License:MIT
Last Updated:Oct 6, 2026
Links: GitHub  ·  Packagist
Maintainer: KFoobar

Fortnox API Client for Laravel

Simplifies integration with the Fortnox API.

Please notice! This package does not yet support all available resources in the Fortnox API

Requirements

  • Laravel 8 or higher
  • PHP 8.0 or higher
  • Valid client id (from Fortnox)
  • Valid client secret (from Fortnox)
  • Valid refresh token (from Fortnox)

Installation

You can install the package via Composer:

composer require kfoobar/laravel-fortnox

Settings for .env

FORTNOX_CLIENT_ID=
FORTNOX_CLIENT_SECRET=
FORTNOX_REFRESH_TOKEN=

Fortnox authorization

In order to use the Fortnox API, you need a valid refresh token. To get a refresh token, you need to grant access to the integration via Fortnox's OAuth2 authorization code flow. In that process, you are assigned an authorization code that you can use to exchange for a pair of token:

The access token - which is used to authenticate all API request - is only valid for 1 hour and needs to be refreshed using a refresh token. This package handles that process as long you have a valid refresh token.

The refresh token - which is used to renew the access token - is valid for 30 days. If it expires, you need to redo the OAuth2 authorization flow.

Every time you renew you access token, you will be assigned a new refresh token that is valid for another 30 days. It is therefore important that you regularly renew the tokens so that the refresh token does not expire.

You can renew your tokens with the following command:

php artisan fortnox:refresh

Both the access token and the refresh token are stored in your application's cache. Keep this in mind when you purge the cache or changes cache driver.

Instructions

Coming soon...

Contributing

Contributions are welcome!

License

The MIT License (MIT). Please see License File for more information.

Related Packages

railken/lara-eye
38,923 38
api
lasserafn/php-fortnox

Fortnox REST wrapper for PHP

97 1
juampi92/api-resources

Manage your resources maintaining API versioning

934,502 111
tailflow/laravel-orion

Orion for Laravel allows you to build a fully featured REST API based on your El...

803,682 1,592
unlu/laravel-api-query-builder

Laravel API Query Builder Package.

720,455 329

Version History

Version Released PHP Laravel License
v0.2.0 ^8 >=8 MIT
v0.1.3 ^8 >=6 MIT
v0.1.2 ^8 >=6 MIT
v0.1.1 ^8 >=6 MIT
v0.1.0 ^8 >=6 MIT