walletlayer / php
WalletLayer PHP SDK for server-side hosted checkout integrations.
v0.2.0
2026-07-17 22:29 UTC
Requires
- php: >=8.1
Requires (Dev)
- phpunit/phpunit: ^10.0
README
WalletLayer PHP SDK for server-side checkout integrations.
This package is free to use. WalletLayer billing is based on confirmed checkout transactions and the active plan on your WalletLayer account.
Setup
- Create a WalletLayer merchant account.
- Create an API key from the dashboard with your brand name, logo, support email, and enabled currencies.
- Copy the API secret when it is shown. It is displayed once only.
- Install the PHP SDK with Composer or download the package zip.
- Store the API key, API secret, WalletLayer API URL, and local encryption settings in your server environment.
- Keep all secrets on your backend only. Do not place the API secret in templates, JavaScript, mobile apps, or public repositories.
- Activate the SDK from your backend using signed API credentials.
- Create the checkout session from your backend and redirect the customer to the hosted WalletLayer checkout URL.
- After your webhook endpoint is available, add the webhook URL in the API key settings inside WalletLayer.
- Verify WalletLayer payment events before crediting an order, subscription, wallet balance, or customer account.
Security Notes
- All operational API communication must be signed with your API secret.
- Wallet mnemonics, encryption keys, treasury private keys, and sweep signing material must remain on your server.
- If your integration performs local sweeping, estimate live network gas at sweep time and add a small buffer, usually about 10%, instead of using a fixed hardcoded gas amount.
- WalletLayer should receive only the checkout and public payment metadata required to process the hosted checkout.
- Review the package source before production use and pin versions in your deployment pipeline.
Billing Notes
The Free plan includes a small monthly transaction allowance. Paid plans increase the included monthly volume. When a plan allowance is exceeded, WalletLayer can charge overage from the merchant balance. If the balance is insufficient, checkout is disabled until the account is funded or the plan is upgraded.