Download the PHP package usdpay/laravel without Composer
On this page you can find all versions of the php package usdpay/laravel. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download usdpay/laravel
More information about usdpay/laravel
Files in usdpay/laravel
Package laravel
Short Description Official Laravel SDK for accepting USDT payments with USDPAY.
License MIT
Homepage https://usdpay.me/integrations/laravel
Informations about the package laravel
USDPAY for Laravel
Accept USDT payments in Laravel applications.
Customers pay directly to your wallet. USDPAY confirms payments on-chain and sends signed webhooks.
Requirements
- PHP 8.2+
- Laravel 12 or Laravel 13
- A USDPAY store with a secret API key and webhook secret
Quick start
Install the package. Laravel discovers its service provider and facade automatically:
Add server-side credentials to .env:
Create an invoice with a stable idempotency key:
If network is omitted, the customer chooses TRC20, TON or BEP20 at USDPAY checkout. Monetary values are decimal strings and are never converted to floats.
Dependency injection
The facade is optional. Inject UsdpayManager into application services or controllers:
Fetch an invoice by its unguessable ID:
The Invoice DTO exposes documented fields as typed properties and preserves the complete API response in $invoice->raw for forward compatibility.
Signed webhook events
The package registers this route by default:
It verifies X-USDPAY-Signature against the original raw request body before decoding JSON. Valid invoice.paid and invoice.expired deliveries become Laravel events:
Register the listener using normal Laravel event discovery or your application's event configuration.
The package verifies and parses the delivery only. It never changes an Order, grants a subscription, credits a balance, refunds a payment or performs fulfilment automatically.
Production idempotency example
Signature verification proves that USDPAY sent the request. It does not make fulfilment idempotent. Store X-USDPAY-Idempotency-Key under a unique constraint and lock the order in one transaction:
Configuration
Publish the configuration when defaults need to be changed:
Available environment variables:
Set USDPAY_WEBHOOK_ENABLED=false to disable automatic route registration. Configure the resulting HTTPS webhook URL in the corresponding USDPAY store.
API errors and retries
API and transport failures throw UsdpayApiException:
The package performs at most two automatic retries for invoice creation on connection failures and HTTP 429, 500, 502, 503 or 504. Every attempt reuses the caller-provided Idempotency-Key; Retry-After is honored. Validation, authentication, authorization, not-found and conflict responses are never retried. Secrets and authorization headers are redacted from exceptions.
Security
- Keep
USDPAY_SECRETserver-side. Never expose it to JavaScript, Blade output or browser requests. - Use HTTPS callback URLs in production.
- Verify payment only from a signed
invoice.paidwebhook or authenticated server-side API state, never from a browser redirect. - Use
X-USDPAY-Idempotency-Keyand a database unique constraint before fulfilling an order. - Never log API keys, webhook secrets, raw authorization headers or wallet private keys.
- USDPAY is non-custodial. This package never needs a seed phrase or private key.
Supported networks
- USDT on TRON (
TRC20) - USDT on TON
- USDT on BNB Smart Chain (
BEP20)
Documentation
Using Node.js? See the official Node.js SDK.
License
MIT © 2026 PIXELTIDE LLC.
All versions of laravel with dependencies
illuminate/http Version ^12.0|^13.0
illuminate/support Version ^12.0|^13.0