PHP library for Vertex Cards API interaction

Installs: 13

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 0

Forks: 0

Open Issues: 0

pkg:composer/friends-of-vertex-cards/api-client

v0.6 2025-11-14 15:54 UTC

This package is auto-updated.

Last update: 2025-12-12 17:23:41 UTC


README

PHP library for Vertex Cards API interaction

Supported PHP Versions

  • PHP 8.3+

Documentation

1. Installation

The Vertex Cards API Client can be installed using Composer by running the following command:

composer require friends-of-vertex-cards/api-client

2. Getting API token

The library provides authorization flows for users based on a custom header.

Proceed to documentation to obtain your Live API Key and Company Uuid.

3. Client Initialization

Create ApiClient object using the following code:

$apiKey = 'your-api-key'; // step 2. Getting API token
$factory = new \FriendsOfVertexCards\ApiClient\VertexCardsClientFactory(
            new \Http\Adapter\Guzzle7\Client(),
            new \Symfony\Component\Serializer\Serializer(),
            'https://gateway.vertex-cards.com',
            '/api/v1/cards',
            new \Psr\Log\NullLogger(),
);

$client = $factory->create(new ConfigureDto($apiKey));

Also you can implement your own factory by implementing \FriendsOfVertexCards\ApiClient\VertexCardsClientFactoryInterface

4. API Requests

You can find the full list of API methods here.

4.1 Request Sample

Example of getting accounts:

$companyUuid = Ramsey\Uuid\Uuid::fromString('your-company-uuid') // step 2. Getting API token
$apiKey = 'your-api-key'; // step 2. Getting API token
/** @var \FriendsOfVertexCards\ApiClient\VertexCardsClientInterface $client */
$client = $factory->create(new ConfigureDto($apiKey)); // step 3. Client Initialization

/** @var \FriendsOfVertexCards\ApiClient\Account\List\GetListAccountResponse $accounts */
$accounts = $client->getAccounts(new \FriendsOfVertexCards\ApiClient\Account\List\GetListAccountRequest($companyUuid, 1, 10));

5. Use cases