Download the PHP package rootdigit/sagapay without Composer
On this page you can find all versions of the php package rootdigit/sagapay. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download rootdigit/sagapay
More information about rootdigit/sagapay
Files in rootdigit/sagapay
Package sagapay
Short Description SagaPay - The world's first free, non-custodial blockchain payment gateway SDK for PHP
License MIT
Homepage https://sagapay.net
Informations about the package sagapay
SagaPay PHP SDK
SagaPay (https://sagapay.net) is the world's first free, non-custodial blockchain payment gateway service provider, enabling businesses to seamlessly integrate cryptocurrency payments without holding customer funds. With enterprise-grade security and zero transaction fees, SagaPay empowers merchants to accept crypto payments across multiple blockchains while maintaining full control of their digital assets.
Installation
Install the SagaPay PHP SDK via Composer:
Quick Start
Features
- Deposit address generation
- Withdrawal processing
- Transaction status checking
- Wallet balance fetching
- Multi-chain support (ERC20, BEP20, TRC20, POLYGON, SOLANA)
- Webhook notifications (IPN)
- Custom UDF field support
- Zero transaction fees
- Non-custodial architecture
API Reference
Create Deposit
Create Withdrawal
Check Transaction Status
Fetch Wallet Balance
Handling Webhooks (IPN)
SagaPay sends webhook notifications (IPNs) to your specified ipnUrl when a transaction completes. Use the WebhookHandler to process these notifications:
Webhook Payload Format
SagaPay currently sends an IPN when a transaction completes, so status is always COMPLETED. Note that type uses UPPERCASE values on the wire:
udf and txHash may be null. Delivery is at least once: the same notification can arrive more than once, so make your webhook processing idempotent.
Webhook Signature
Each IPN request carries an X-Sagapay-Signature header in the form sha256=<hex>, where <hex> is the HMAC-SHA256 of the exact raw request body keyed with a platform-issued IPN secret. This secret is NOT your API secret. If you have one, pass it as the second constructor argument of WebhookHandler to enable signature verification:
When you don't have an IPN secret, leave the argument out (or pass null) — the signature check is skipped and server-side verification below is the primary check.
Verifying an IPN with the Server
The primary way to confirm an IPN is to ask the SagaPay API directly via Client::verifyIpn() (or the WebhookHandler::verifyWithServer() convenience wrapper shown above). This endpoint authenticates with your API key/secret in the request body, so it needs no extra configuration:
Error Handling
All methods in the SagaPay SDK can throw a SagaPay\SDK\Exception. This exception contains:
- Message: Error description
- Code: Error code
- HTTP code: HTTP status code (when applicable)
License
This SDK is released under the MIT License.
Support
For questions or support, please contact [email protected] or visit https://sagapay.net.
All versions of sagapay with dependencies
ext-curl Version *
ext-json Version *