Skip to main content
The PHP SDK requires PHP 8.1 or newer and uses Guzzle 7.8 or newer.

PHP SDK on GitHub

Browse the source code, examples, releases, and issue tracker.

Installation

Initialize the client

secretKey is the original secret issued with the API key. It enables signed money operations and webhook signature verification. You can also provide a custom host, API version, or Guzzle client:

Withdrawals and refunds

The SDK generates the timestamp and signature. Save a unique UUID for each intended operation before calling it, then reuse the same ID and payload if the response is lost.
The request ID argument is optional; the SDK generates a new UUID when it is omitted. See Withdrawals and refunds for validation rules and response fields.

Available methods

API objects are returned as associative arrays with field names matching the public API JSON. getCountries() returns country codes and names. estimateFees() returns amount, finalPrice, fee, and merchantReceiveAmount, with optional summaryFee.

Verify a webhook signature

Set secretKey to the original API secret. The SDK parses the JSON, canonicalizes it according to RFC 8785 JCS, and verifies HMAC-SHA256 with a timing-safe comparison. It accepts the full jcs-sha256=<hex> header or a plain hex digest. Always use the retrieved invoice for payment decisions.

Errors

See Handle a callback for verification code.