Skip to main content
Tilta’s official PHP SDK wraps the entire public API surface, so you can integrate buyer onboarding, credit facility management, order creation, and invoice capture into any PHP application without writing raw HTTP calls. The SDK handles authentication, request serialisation, and response mapping for you, letting you focus on your business logic instead. The package is hosted on Packagist and the source is available on GitHub.

Requirements

  • PHP 7.4 or later
  • Composer (recommended installer)
  • A Tilta account with API credentials – contact support@tilta.io to request sandbox access

Installation

Install the SDK using Composer:
Composer adds the package to your composer.json and downloads it into your vendor/ directory. Make sure you require Composer’s autoloader in your application if you have not already done so:
Always pin your dependencies to a specific version range in production to avoid unexpected breaking changes. Run composer update tilta-io/tilta-php-sdk to pull in the latest compatible release.

Configuration

Before making any API calls, initialise the SDK client with your API key and target environment:
Never hard-code your API key in source files. Store it in an environment variable and read it with getenv('TILTA_API_KEY') or your framework’s configuration system.

Creating a buyer

The example below shows how to create a new buyer – the first step in most Tilta integrations. A buyer is a business that will receive a credit facility and place orders on your platform.
The execute method returns a typed response model. You can call getter methods on the returned object to access fields such as getId(), getStatus(), and getLegalName().

Common operations

After a buyer is onboarded, request a credit facility to open their credit line. Tilta’s underwriting engine evaluates the request automatically.
Create an order when a buyer is ready to make a purchase. The order records the purchase intent and must be authorised before an invoice can be captured.
Capture an invoice once goods or services have been delivered. This is the legally effective financing step – it triggers merchant payout and starts the buyer’s repayment clock.

Error handling

The SDK throws typed exceptions for API errors. Wrap your calls in a try-catch block and handle exceptions according to your application’s needs:

Further resources

GitHub repository

Browse the full source code, open issues, and read the repository README for advanced configuration options and changelog details.

Packagist package

View all published versions, download statistics, and dependency information on Packagist.

API reference

Explore the full REST API documentation that underpins the PHP SDK.

Integration guides

Step-by-step guides for buyer onboarding, credit facility setup, and the order-to-invoice flow.