Official SDKs

Speed up your integration with our official SDKs that provide idiomatic interfaces for your programming language of choice.

PHP SDK

The official Contazen PHP SDK provides a simple and elegant way to interact with the Contazen API from your PHP applications.

Installation

Install the SDK using Composer:
composer require contazen/contazen-php-sdk

Quick Start

<?php
require_once 'vendor/autoload.php';

use Contazen\ContazenClient;
use Contazen\Resources\Invoice;
use Contazen\Resources\Client;

// Initialize the client
$contazen = new ContazenClient('sk_live_YOUR_API_KEY');

// Create a client
$client = $contazen->clients()->create([
    'type' => 'b2b',
    'name' => 'Acme Corp SRL',
    'cui' => 'RO12345678',
    'address' => 'Str. Exemplu nr. 123',
    'city' => 'București',
    'email' => 'contact@acmecorp.ro'
]);

// Create an invoice
$invoice = $contazen->invoices()->create([
    'client_id' => $client->id,
    'items' => [
        [
            'description' => 'Web Development Services',
            'quantity' => 10,
            'price' => 100.00,
            'vat_rate' => 19
        ]
    ]
]);

// Send the invoice
$contazen->invoices()->send($invoice->id, [
    'email' => 'contact@acmecorp.ro',
    'message' => 'Please find attached your invoice.'
]);

Features

Available Resources

The PHP SDK provides access to all Contazen API resources:
  • Clients: Create, retrieve, update, delete, and list clients
  • Invoices: Full invoice management including creation, sending, voiding, and PDF generation
  • Products: Manage your product catalog
  • Settings: Access account and company settings

Requirements

  • PHP 7.4 or higher
  • Composer
  • ext-curl
  • ext-json

Documentation & Support

Community SDKs

Community SDKs are maintained by the community and may not always be up to date with the latest API changes. We recommend checking their documentation and testing thoroughly before using in production.
If you’ve built an SDK for the Contazen API, please contact us to have it listed here.

Building Your Own SDK

If an SDK doesn’t exist for your language, you can build your own using our OpenAPI specification. Many languages have tools to generate client libraries from OpenAPI specs:

Example: Generating a TypeScript Client

npm install @openapitools/openapi-generator-cli -g

openapi-generator-cli generate \
  -i https://api.contazen.ro/openapi.yaml \
  -g typescript-axios \
  -o ./contazen-sdk

Need Help?

If you need assistance with any SDK or have questions about integrating with the Contazen API: