conta365 / conta365-api
Conta365.ro is a platform for managing invoices, handling eInvoices with RO eFactura and other business related activities.
Requires
- php: >=8.2
- guzzlehttp/guzzle: >=7.6
- spatie/laravel-data: ^4.11
This package is not auto-updated.
Last update: 2025-06-02 19:40:37 UTC
README
Conta365 PHP API
Conta365 PHP API is a library intended to connect your e-commerce solution with the online invoicing platform, Conta365.ro
Installation
Use the composer package manager.
composer require conta365/conta365-api
Usage
Authentication
$api = new Conta365Api(new Config(
accessToken: 'ey....',
baseUri: 'https://api.conta365.ro' // optional, can be changed for development
));
Listing Invoices
$invoicesList = $api->getInvoiceClient()->list();
Create Invoice
$newModel = Invoice::from([
'type' => Invoice::TYPE_COMMERCIAL_INVOICE,
'invoice_serial_id' => $invoiceSerial->id,
'number' => $invoiceSerial->next_number,
'issue_date' => new \DateTime(),
'due_date' => (new DateTime())->modify('+15 days'),
'currency' => 'RON',
'seller_name' => 'ACME SRL',
'seller_vat_number' => 12345678,
'seller_subject_to_vat' => false,
'seller_vat_at_payment' => false,
'seller_trade_registry_number' => 'F26/0000/2000',
'seller_county' => 'MS',
'seller_city' => 'Targu Mures',
'seller_address' => 'Brasovului 5',
'seller_postal_code' => 540450,
'seller_contact_name' => 'Ion Popescu',
'seller_contact_email' => 'email@domain.com',
'seller_contact_phone' => '0734988988',
'buyer_name' => 'Client',
'buyer_vat_number' => '0000000000000',
'buyer_trade_registry_number' => '-',
'buyer_country' => 'RO',
'buyer_county' => 'MS',
'buyer_city' => 'Targu Mures',
'buyer_address' => 'Sarguintei 8',
'amount' => 40.0,
'effective_amount' => 40.0,
'effective_vat_amount' => 0,
'effective_amount_with_vat' => 40.0,
'data' => [
'seller_trading_name' => 'ACME Trading Company'
],
'items' => [[
'name' => 'Abonament',
'unit_code' => 'BUC',
'quantity' => 1.0,
'vat_rate' => 0,
'vat_category' => 'O',
'vat_exemption_reason' => 'VATEX-EU-O',
'unit_price' => 40.0,
'amount' => 40.0,
'discount_type' => InvoiceItem::DISCOUNT_TYPE_NONE,
'discount_value' => 0,
'discount_amount' => 0,
'effective_amount' => 40.0,
]]
]);
$createdModel = $api->getInvoiceClient()
->create($newModel);
dump($createdModel);
Other examples
See `examples
` folder for more examples.
Development account
We have provisioned a development environment, intended to be used for develoment purposes. This includes all the functionalities of the production environment, including integration with the Test environment of RO eFactura and RO eTransport.
Contact us for development environment URL and credentials: www.conta365.ro/contact
Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.