Download the PHP package pspline/php-sdk without Composer
On this page you can find all versions of the php package pspline/php-sdk. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package php-sdk
PSP Line PHP SDK
Official PHP SDK for the PSP Line Merchant API — create crypto invoices, check payment statuses, and verify webhook signatures.
Requirements
- PHP 7.2 or higher (tested on 7.4 — 8.4)
- Extensions:
curl,json,mbstring - No external dependencies required (Guzzle is optional)
Installation
Quick Start
Configuration
All Options
| Option | Type | Default | Description |
|---|---|---|---|
base_url |
string |
https://app.pspline.com/api/cpci/v1 |
API base URL |
timeout |
int |
30 |
Request timeout in seconds |
retries |
int |
2 |
Retry count on 5xx/network errors |
logger |
LoggerInterface |
null |
PSR-3 logger instance |
http_client |
HttpClientInterface |
null |
Custom HTTP transport |
Logging
Pass any PSR-3 compatible logger:
Using Guzzle
By default, the SDK uses a built-in cURL client with zero dependencies. If you prefer Guzzle:
API Reference
Invoices
Create Invoice
Find Invoice
Invoice Statuses
| Status | Constant | Description |
|---|---|---|
| 0 | InvoiceStatus::WAITING |
Waiting for deposits |
| 1 | InvoiceStatus::SUCCESS |
Successful |
| 2 | InvoiceStatus::FAILED |
Unsuccessful |
| 3 | InvoiceStatus::CANCELLED |
Cancelled |
| 4 | InvoiceStatus::TIMEOUT |
Timeout |
| 10 | InvoiceStatus::CHECKING |
Data checking |
| 11 | InvoiceStatus::PARTIAL_SUCCESS |
Partial success |
| 12 | InvoiceStatus::UNCOMPLETED_MERGE |
Uncompleted merge |
| 13 | InvoiceStatus::UNCOMPLETED_CHARGE |
Uncompleted charge |
| 14 | InvoiceStatus::UNIDENTIFIED |
Unidentified |
Cryptocurrency Amounts
PSP Line uses integer amounts in minimum currency units:
| Currency | Precision | Example |
|---|---|---|
| USDT_TRON | 6 | 15 USDT → 15000000 |
| BTC | 8 | 0.001 BTC → 100000 |
| ETH | 18 | 0.027 ETH → 27000000000000000 |
| USDT_ETH | 6 | 100 USDT → 100000000 |
Webhook Verification
PSP Line sends POST callbacks with HMAC signatures. Always verify them:
Error Handling
The SDK throws specific exceptions for different error types:
Exception Hierarchy
Testing
Framework Integration
Laravel
Symfony
Security
If you discover a security vulnerability, please email [email protected] instead of creating a public issue.
License
The MIT License (MIT). See LICENSE for details.
All versions of php-sdk with dependencies
ext-json Version *
ext-curl Version *
ext-mbstring Version *