Download the PHP package sodacards/sdk without Composer
On this page you can find all versions of the php package sodacards/sdk. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download sodacards/sdk
More information about sodacards/sdk
Files in sodacards/sdk
Package sdk
Short Description The official PHP SDK for the SODACARDS Developer API.
License MIT
Homepage https://developer.sodacards.com
Informations about the package sdk
SODACARDS PHP SDK
The official PHP client for the SODACARDS Developer API — sell gift cards and game top-ups from your own systems, across West Africa.
Browse the catalog, place orders, retrieve delivered codes, and subscribe to webhooks.
Requirements
PHP 8.1 or newer, with the Guzzle HTTP client (installed automatically by Composer).
Installation
Authentication
Every request is authenticated with an API key that you generate from the developer dashboard. Keys are prefixed sc_live_ (production) or sc_test_ (sandbox); the sandbox returns fake codes so you can integrate safely.
Load the key from the environment — never hard-code it in source.
Quickstart
Idempotency
placeOrder is the only state-changing call. Send an Idempotency-Key header so a retried request never creates a duplicate order — the API returns the original order for a repeated key.
Operations
| Method | Description |
|---|---|
listCatalog |
List sellable products (cursor-paginated). |
getProduct |
Fetch a single product by id. |
placeOrder |
Buy one or more products. |
getOrder |
Retrieve an order by id. |
listOrders |
List your orders (cursor-paginated). |
revealOrderCodes |
Reveal the delivered codes for a fulfilled order. |
registerWebhook |
Subscribe an endpoint to events. |
listWebhooks |
List your webhook endpoints. |
deleteWebhook |
Remove a webhook endpoint. |
ping |
Health check for your credentials. |
Pagination
List endpoints use cursor (keyset) pagination. Pass the nextCursor returned by a response as the cursor of the next call until it is empty.
Errors
Failed requests throw Sodacards\ApiException, which carries the HTTP status and the API error body.
Documentation and support
- API reference and guides: https://developer.sodacards.com
- Support: mailto:[email protected]
License
Released under the MIT License.
This SDK is generated from the SODACARDS OpenAPI specification and is regenerated automatically whenever the API changes. Open issues on the documentation portal rather than editing generated files directly.
All versions of sdk with dependencies
ext-curl Version *
ext-json Version *
ext-mbstring Version *
guzzlehttp/guzzle Version ^7.3
guzzlehttp/psr7 Version ^1.7 || ^2.0