Download the PHP package tokenpay-platform/sdk-php without Composer

On this page you can find all versions of the php package tokenpay-platform/sdk-php. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package sdk-php

TokenPay PHP SDK

Packagist PHP Version

Official PHP SDK for the TokenPay payment gateway — P2P crypto trading platform with fiat on/off ramps and webhook-driven merchant integrations.

Source of truth. The canonical source lives in the private gpgo/tokenpay monorepo under sdks/php/. A public mirror is auto-published to gpgo/tokenpay-sdk-php on every v*-php release tag; that mirror is what Packagist installs from. See ADR-097 in docs/DECISIONS.md (monorepo only) for the rationale.

Requirements

Install

The Packagist vendor prefix is tokenpay-platform/ rather than the shorter tokenpay/ because the latter is held by a defensive dependency-confusion registrar (m-vendors, unrelated to this project). The GitHub repository is still gpgo/tokenpay-sdk-php; only the Packagist vendor differs.

Quick start

Retrieve, list, cancel

The OpenAPI spec exposes cancelPayment, not a refund endpoint. The SDK tracks the spec; a dedicated refund method will land when the server-side endpoint does.

Verify a webhook

The TokenPay server signs every webhook with HMAC-SHA256 over a canonical string method + "\n" + path + "\n" + timestamp + "\n" + payload. The SDK verifies the signature with constant-time comparison.

Client options

Errors

Class When
TokenPay\SDK\Exceptions\ApiException HTTP 4xx / 5xx from the TokenPay API. getStatusCode() + getBody() available.
TokenPay\SDK\Exceptions\NetworkException Transport failures (DNS, connection, TLS, timeout).
TokenPay\SDK\Exceptions\TokenPayException Base class for both of the above. Catch this for "any SDK error".

The client retries transient failures (5xx + network) with exponential backoff up to maxRetries times (default 3). 4xx responses are never retried.

WooCommerce integration

A minimal WooCommerce integration lives under examples/woocommerce/. It demonstrates:

The example is runnable against a local WooCommerce instance for development; live-site production testing is part of the TokenPay Integration Partners review (S091).

Versioning and stability

The TokenPay API follows the deprecation policy in docs/api/VERSIONING.md: v1 stable with a 6-month deprecation window. This SDK's minor versions track the API's minor bumps; patch versions are bug fixes only. See CHANGELOG.md.

Publishing (maintainer-only)

Packagist auto-publishes via the GitHub webhook on every tag push. Maintainer workflow:

Packagist webhook configuration, the one-time namespace reservation, and the public-mirror sync workflow are documented in docs/ops/packagist-setup.md (monorepo only). The sync itself runs from .github/workflows/sync-php-sdk.yml.

Security

Please report security issues privately to [email protected] rather than via a public GitHub issue. See the repo's root SECURITY.md.

License

MIT — see LICENSE.


All versions of sdk-php with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
guzzlehttp/guzzle Version ^7.5
ext-json Version *
ext-hash Version *
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package tokenpay-platform/sdk-php contains the following files

Loading the files please wait ...