.env file and instantiate the client anywhere in your application using Laravel’s config helper. No service provider is required — the SDK works with standard Laravel conventions out of the box.
Requirements
- PHP 8.1+
- Laravel 10+
- Composer
Installation
Install the SDK with Composer:Configuration
1
Add credentials to .env
Add your Paydios API base URL and secret key to your Never commit this file to version control.
.env file. Retrieve your secret key from the merchant dashboard:2
Register in config/services.php
Add a
paydios entry to your config/services.php file so the SDK config is accessible via Laravel’s config helper:3
Instantiate the client
Wherever you need the SDK, create a
Client instance by passing the registered config:Using in a Controller
The example below shows a controller method that creates a Paydios checkout session and redirects the customer to the payment page:.env and config/services.php alongside your secret key:
Listing Products
Use the same pattern to call any SDK method. The example below lists your first 20 products:See the PHP SDK reference for the full list of available methods, including product management, checkout sessions, and error handling.