Download the PHP package danipa/sdk without Composer
On this page you can find all versions of the php package danipa/sdk. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package sdk
danipa/sdk
Official PHP SDK for the Danipa payments API.
Requires PHP 8.1+. Runtime dependencies: Guzzle 7 (default transport) and psr/http-message / psr/http-client / psr/http-factory. Bring your own PSR-18 client to swap Guzzle out — see Pluggable HTTP transport.
Source of truth: this package is developed in the
paboagye/danipa-digital-platformmonorepo (private) and published to Packagist via the public mirrordanipa/php-sdkon everysdk-php-v*tag —git subtree splitkeeps the mirror's tree in lockstep withsdks/php/in the monorepo.
Quick start
Resources
| Resource | Methods |
|---|---|
$danipa->collections() |
create, get |
$danipa->disbursements() |
create, get |
$danipa->wallets() |
getBalance, getBalance($currency) |
$danipa->paymentLinks() |
create |
$danipa->invoices() |
create |
Danipa\Sdk\DanipaWebhook |
verify, computeSignature (static) |
Idempotency
Pass an idempotency key on every mutating call via RequestOptions::withIdempotencyKey(...). The backend dedupes on (merchantId, key) for 24 hours, so retrying a failed request with the same key is safe.
The header is sent on POST requests only — GET calls ignore the option, matching Node + Java.
Retry & timeout
- Auto-retries 5xx and network errors. Default 3 attempts with exponential backoff (200 ms → 400 ms → 800 ms, capped at 2 s, +0–50 ms jitter).
- 4xx never retries — fix the request and re-call.
- 30 s per-request timeout. Override via the builder.
Verifying webhooks
The verifier is namespaced as Danipa\Sdk\DanipaWebhook and works in plain PHP, Symfony, Laravel, or any framework that exposes the raw request body and headers.
Plain PHP
Symfony
Laravel
The 5-minute replay window is enforced server-side. Always pass the raw request body — re-serializing through json_encode(json_decode(...)) rewrites the bytes and breaks the signature.
Error handling
Both classes extend Danipa\Sdk\Errors\DanipaError, which itself extends RuntimeException — catch the base to handle anything from the SDK.
Pluggable HTTP transport
The default transport is Guzzle 7. Pass any PSR-18 ClientInterface to swap it — useful when your app already runs Symfony HttpClient, Buzz, or a managed Guzzle pool with custom middleware:
Optional PSR-17 factories (requestFactory, streamFactory) can be injected the same way; both default to Guzzle's HttpFactory.
Event reference
Full webhook event catalog with payload schemas: developer.sandbox.danipa.com/webhooks/events.
License
MIT.
All versions of sdk with dependencies
ext-json Version *
guzzlehttp/guzzle Version ^7.8
psr/http-client Version ^1.0
psr/http-factory Version ^1.0
psr/http-message Version ^1.1 || ^2.0