Download the PHP package satlane/satlane-php without Composer
On this page you can find all versions of the php package satlane/satlane-php. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download satlane/satlane-php
More information about satlane/satlane-php
Files in satlane/satlane-php
Package satlane-php
Short Description Official PHP SDK for SatLane — non-custodial Bitcoin payments.
License MIT
Homepage https://satlane.com
Informations about the package satlane-php
satlane-php
Official PHP SDK for SatLane — non-custodial Bitcoin payments. Vendor keeps the keys, SatLane handles the checkout and payment detection.
Requires PHP 8.1+.
Quickstart
That's the full happy path. The buyer lands on the hosted checkout, pays with any Bitcoin wallet (or Cash App / Strike / Coinbase via the built-in guides), and you get a signed webhook when the payment confirms.
Receiving webhooks
Always verify against the raw request body, not parsed JSON. Body parsers discard the bytes the signature is computed over.
Top-up payments
If the buyer underpays, the invoice transitions to underpaid and the watcher keeps listening. If they send a follow-up transaction, the watcher automatically merges the payments and the invoice transitions to paid (or late_paid / overpaid depending on the new total).
That means your handler can receive multiple invoice.underpaid events for the same invoice before invoice.paid lands. Dedupe by event_id only — never by (invoice_id, event_type).
The hosted checkout surfaces a "Send remaining X sats" CTA with a fresh bitcoin: URI for only the missing amount, so the buyer doesn't double-pay by rescanning the original QR.
Error handling
Full error catalog: satlane.com/docs/errors.
Configuration
Or from env vars:
What the SDK covers
| Surface | Method |
|---|---|
| Create an invoice | $client->invoices->create([...], idempotencyKey: '...') |
| List invoices | $client->invoices->list([...]) |
| Retrieve | $client->invoices->retrieve($id) |
| Timeline | $client->invoices->timeline($id) |
| Cancel | $client->invoices->cancel($id) |
| Test-mode simulate | $client->invoices->simulate($id, ['event' => 'paid']) |
| Public snapshot (no auth) | $client->invoices->publicSnapshot($id) |
| Webhook endpoints CRUD | $client->webhooks->{list, create, update, delete, rotate, test}($storeId, ...) |
| Delivery history | $client->webhooks->deliveries($storeId) |
| Verify a webhook | WebhookSignature::verify($rawBody, $header, $secret) |
For endpoints we haven't wrapped yet, drop to the raw HTTP:
Going live checklist
- Store has a mainnet xpub registered.
- Store's
test_modetoggle is off. SATLANE_API_KEYis thesl_live_...variant.- Webhook URL is HTTPS and reachable from the public internet.
- Your handler responds
2xxquickly (<10stimeout), persists the side effect synchronously, and dedupes byevent_id. - You verify the signature on every request.
- You handle
invoice.payment_reverted(rare but real — reverse fulfillment on chain reorgs).
Links
License
MIT.