kfoobar/laravel-kivra

Laravel package for the Kivra Sender API

Maintainers

Package info

github.com/KFoobar/laravel-kivra

Homepage

pkg:composer/kfoobar/laravel-kivra

Statistics

Installs: 1

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

v1.0.0 2026-04-02 10:45 UTC

This package is auto-updated.

Last update: 2026-04-02 10:46:52 UTC


README

A lightweight Laravel package for interacting with the Kivra Sender API, supporting both live and sandbox environments.

Note: This package currently covers a limited subset of the Kivra API. Additional endpoints may be added in future releases.

Requirements

  • PHP 8.0 or higher
  • Laravel 9.0 or higher

Installation

Install the package via Composer:

composer require kfoobar/laravel-kivra

Publish the configuration file:

php artisan vendor:publish --tag=kivra-config

This will create a kivra.php file in your config directory.

Configuration

Add the following variables to your .env file:

KIVRA_CLIENT_ID=
KIVRA_CLIENT_SECRET=
KIVRA_TENANT_KEY=
KIVRA_TEST_MODE=

KIVRA_TEST_MODE is optional and defaults to false. Set it to true to route all requests to the Kivra sandbox API.

Usage

Authenticate

Authentication uses the OAuth 2.0 client credentials flow. Call auth() before any other method:

use KFoobar\Kivra\Facades\Kivra;

$kivra = Kivra::auth();

Find a Company

Look up a company by VAT number:

use KFoobar\Kivra\Facades\Kivra;

$company = Kivra::auth()->company('556000-0000');

Returns an array with the company data, or an empty array if not found.

Contribution

Contributions are welcome! If you'd like to contribute to this project, please follow these steps:

  1. Fork the repository.
  2. Create a new branch for your feature or bugfix.
  3. Make your changes and ensure tests pass.
  4. Submit a pull request with a detailed description of your changes.

License

This package is open-source and released under the MIT License. See LICENSE for more information.