{"id":41499819,"url":"https://github.com/seegno/uphold-sdk-php","last_synced_at":"2026-01-23T19:03:51.965Z","repository":{"id":25391763,"uuid":"28820367","full_name":"seegno/uphold-sdk-php","owner":"seegno","description":"Uphold PHP SDK ","archived":false,"fork":false,"pushed_at":"2018-04-17T15:51:06.000Z","size":305,"stargazers_count":28,"open_issues_count":4,"forks_count":24,"subscribers_count":15,"default_branch":"master","last_synced_at":"2025-07-28T23:52:40.247Z","etag":null,"topics":["php","sdk","uphold"],"latest_commit_sha":null,"homepage":"http://seegno.com","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/seegno.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-01-05T16:14:43.000Z","updated_at":"2023-02-16T19:23:02.000Z","dependencies_parsed_at":"2022-08-23T06:50:15.022Z","dependency_job_id":null,"html_url":"https://github.com/seegno/uphold-sdk-php","commit_stats":null,"previous_names":[],"tags_count":17,"template":false,"template_full_name":null,"purl":"pkg:github/seegno/uphold-sdk-php","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seegno%2Fuphold-sdk-php","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seegno%2Fuphold-sdk-php/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seegno%2Fuphold-sdk-php/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seegno%2Fuphold-sdk-php/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/seegno","download_url":"https://codeload.github.com/seegno/uphold-sdk-php/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seegno%2Fuphold-sdk-php/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28698345,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-23T17:25:48.045Z","status":"ssl_error","status_checked_at":"2026-01-23T17:25:47.153Z","response_time":59,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["php","sdk","uphold"],"created_at":"2026-01-23T19:03:51.893Z","updated_at":"2026-01-23T19:03:51.951Z","avatar_url":"https://github.com/seegno.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Uphold SDK for PHP\n[![Latest Version](https://img.shields.io/packagist/v/seegno/uphold-sdk-php.svg)](https://packagist.org/packages/seegno/uphold-sdk-php)\n[![Build Status](https://travis-ci.org/seegno/uphold-sdk-php.svg?branch=master)](https://travis-ci.org/seegno/uphold-sdk-php)\n[![Code Climate](https://codeclimate.com/github/seegno/uphold-sdk-php/badges/gpa.svg)](https://codeclimate.com/github/seegno/uphold-sdk-php)\n[![Test Coverage](https://codeclimate.com/github/seegno/uphold-sdk-php/badges/coverage.svg)](https://codeclimate.com/github/seegno/uphold-sdk-php)\n[![License](https://img.shields.io/packagist/l/seegno/uphold-sdk-php.svg)](https://packagist.org/packages/seegno/uphold-sdk-php)\n\nUphold is a next generation money service business that shields you from bitcoin volatility by enabling you to hold bitcoin as the money you use every day.\n\nThe Uphold SDK for PHP provides an easy way for developers to integrate PHP applications with the [Uphold API](https://uphold.com/en/developer/api/documentation).\n\n## Requirements\n\n* PHP \u003e= 5.5 with the [cURL](http://php.net/manual/en/book.curl.php) extension.\n* [Guzzle](https://github.com/guzzle/guzzle) library.\n\n## Installation\n\n### Standalone\n\nGrab the latest version of the library:\n\n    $ git clone https://github.com/seegno/uphold-sdk-php.git\n\nInstall composer:\n\n    $ curl -s https://getcomposer.org/installer | php\n\nInstall the library dependencies:\n\n    $ php composer.phar install\n\nRequire the autoloader file generated by composer:\n\n```php\nrequire 'vendor/autoload.php';\n```\n\n### Integrating with another project using composer\n\nRequire the library package as a dependency:\n```json\n{\n    \"require\": {\n        \"seegno/uphold-sdk-php\": \"~5.0\"\n    }\n}\n```\n\n## Basic usage\n\nIn order to learn more about the Uphold API, please check out the [API documentation](https://uphold.com/en/developer/api/documentation).\n\nFirst, create a Personal Access Token (PAT) using the command described below.\n\n### Create a Personal Access Token\n\n    $ php lib/Uphold/console.php tokens:create\n\nThen, create a new instance of the `Client` class with token. Take a look at the following examples and explore more on the [examples](https://github.com/seegno/uphold-sdk-php/tree/master/examples) directory.\n\n### Authorize user\n```php\nrequire_once 'vendor/autoload.php';\n\nuse Uphold\\UpholdClient as Client;\n\n// Initialize the client.\n$client = new Client(array(\n  'client_id' =\u003e 'APPLICATION_CLIENT_ID',\n  'client_secret' =\u003e 'APPLICATION_CLIENT_SECRET',\n));\n\n// Authorize user using the code parameter from the application redirect url.\n$user = $client-\u003eauthorizeUser('CODE');\n\n// Get the Bearer token.\n$bearer = $user-\u003egetClient()-\u003egetOption('bearer');\n```\n\n### Get authenticated user\n```php\nrequire_once 'vendor/autoload.php';\n\nuse Uphold\\UpholdClient as Client;\n\n// Initialize the client.\n$client = new Client();\n\n// Get user.\n$user = $client-\u003egetUser('AUTHORIZATION_TOKEN');\n```\n\n### Get user balances\n```php\nrequire_once 'vendor/autoload.php';\n\nuse Uphold\\UpholdClient as Client;\n\n// Initialize the client.\n$client = new Client();\n\n// Get user.\n$user = $client-\u003egetUser('AUTHORIZATION_TOKEN');\n\n// Get user balances for all currencies.\n$balances = $user-\u003egetBalances();\n```\n\nYou could get user total balance:\n\n```php\n// Get user total balance.\n$balance = $user-\u003egetTotalBalance();\n```\n\nThe above produces the output shown below:\n\n```php\nArray\n(\n    [amount] =\u003e 3.14\n    [currency] =\u003e BTC\n)\n```\n\n### Get user cards\n```php\nrequire_once 'vendor/autoload.php';\n\nuse Uphold\\UpholdClient as Client;\n\n// Initialize the client.\n$client = new Client();\n\n// Get user.\n$user = $client-\u003egetUser('AUTHORIZATION_TOKEN');\n\n// Get current user cards.\n$cards = $user-\u003egetCards();\n```\n\n### Create new card\n```php\nrequire_once 'vendor/autoload.php';\n\nuse Uphold\\UpholdClient as Client;\n\n// Initialize the client.\n$client = new Client();\n\n// Get the current user.\n$user = $client-\u003egetUser('AUTHORIZATION_TOKEN');\n\n// Create a new 'BTC' card.\n$card = $user-\u003ecreateCard('My new card', 'BTC');\n```\n\nThe above produces the output shown below:\n\n```php\nUphold\\Model\\Card Object\n(\n    [id:protected] =\u003e ade869d8-7913-4f67-bb4d-72719f0a2be0\n    [address:protected] =\u003e Array\n        (\n            [bitcoin] =\u003e 1GpBtJXXa1NdG94cYPGZTc3DfRY2P7EwzH\n        )\n\n    [addresses:protected] =\u003e Array\n        (\n            [0] =\u003e Array\n                (\n                    [id] =\u003e 1GpBtJXXa1NdG94cYPGZTc3DfRY2P7EwzH\n                    [network] =\u003e bitcoin\n                )\n\n        )\n\n    [available:protected] =\u003e 0.00\n    [balance:protected] =\u003e 0.00\n    [currency:protected] =\u003e BTC\n    [label:protected] =\u003e My new card\n    [lastTransactionAt:protected] =\u003e\n    [transactions:protected] =\u003e\n    [settings] =\u003e Array\n        (\n            [position] =\u003e 10\n        )\n)\n```\n\n### Get rates\n```php\nrequire_once 'vendor/autoload.php';\n\nuse Uphold\\UpholdClient as Client;\n\n// Initialize the client.\n$client = new Client();\n\n// Get rates (public endpoint).\n$rates = $client-\u003egetRates();\n```\n\nOr you could get rates for a specific currency:\n\n```php\n// Get rates for BTC.\n$rates = $client-\u003egetRatesByCurrency('BTC');\n```\n\nThe above produces the output shown below:\n\n```php\nArray\n(\n    [0] =\u003e Uphold\\Model\\Rate Object\n        (\n            [ask:protected] =\u003e 1\n            [bid:protected] =\u003e 1\n            [currency:protected] =\u003e BTC\n            [pair:protected] =\u003e BTCBTC\n        )\n\n    [1] =\u003e Uphold\\Model\\Rate Object\n        (\n            [ask:protected] =\u003e 234.89\n            [bid:protected] =\u003e 234.8\n            [currency:protected] =\u003e USD\n            [pair:protected] =\u003e BTCUSD\n        )\n)\n```\n\n### Create and commit a new transaction\n```php\nrequire_once 'vendor/autoload.php';\n\nuse Uphold\\UpholdClient as Client;\n\n// Initialize the client.\n$client = new Client();\n\n// Get user.\n$user = $client-\u003egetUser('AUTHORIZATION_TOKEN');\n\n// Get a specific card by id.\n$card = $user-\u003egetCardById('ade869d8-7913-4f67-bb4d-72719f0a2be0');\n\n// Create a new transaction.\n$transaction = $card-\u003ecreateTransaction('foo@bar.com', '2.0', 'BTC');\n\n// Commit the transaction.\n$transaction-\u003ecommit();\n```\n\nThe above produces the output shown below:\n\n```php\nUphold\\Model\\Transaction Object\n(\n    [id:protected] =\u003e a97bb994-6e24-4a89-b653-e0a6d0bcf634\n    [createdAt:protected] =\u003e 2015-01-30T11:46:11.439Z\n    [denomination:protected] =\u003e Array\n        (\n            [pair] =\u003e BTCBTC\n            [rate] =\u003e 1\n            [amount] =\u003e 2.0\n            [currency] =\u003e BTC\n        )\n    [destination:protected] =\u003e \u003csnip\u003e\n    [message:protected] =\u003e\n    [origin:protected] =\u003e \u003csnip\u003e\n    [params:protected] =\u003e \u003csnip\u003e\n    [refundedById:protected] =\u003e\n    [status:protected] =\u003e completed\n    [type] =\u003e transfer\n)\n```\n\n### Get all public transactions\n```php\nrequire_once 'vendor/autoload.php';\n\nuse \\Uphold\\UpholdClient as Client;\n\n// Initialize the client.\n$client = new Client();\n\n// Get all public transactions (public endpoint).\n$pager = $client-\u003egetReserve()-\u003egetTransactions();\n\n// Get next page of transactions.\n$transactions = $pager-\u003egetNext();\n```\n\nOr you could get a specific public transaction:\n\n```php\n// Get one public transaction.\n$transaction = $client-\u003egetReserve()-\u003egetTransactionById('a97bb994-6e24-4a89-b653-e0a6d0bcf634');\n```\n\n### Get reserve status\n```php\nrequire_once 'vendor/autoload.php';\n\nuse \\Uphold\\UpholdClient as Client;\n\n// Initialize the client.\n$client = new Client();\n\n// Get the reserve summary of all the obligations and assets within it (public endpoint).\n$statistics = $client-\u003egetReserve()-\u003egetStatistics();\n```\n\n### Pagination\n\nSome endpoints will return a paginator. Here is some examples on how you can handle it.\n\n```php\n// Get public transactions.\n$pager = $client-\u003egetReserve()-\u003egetTransactions();\n\n// Check whether the paginator has a valid next page.\nwhile($pager-\u003ehasNext()) {\n    // Get next page with results.\n    $transactions = $pager-\u003egetNext();\n\n    // Do something...\n}\n```\n\n## Tests\n\nRun the tests from the root directory:\n\n    $ ./vendor/bin/phpunit\n\nYou can find PHPUnit documentation [here](https://phpunit.de/documentation.html).\n\n## Contributing \u0026 Development\n\n#### Contributing\n\nFound a bug or want to suggest something? Take a look first on the current and closed [issues](https://github.com/seegno/uphold-sdk-php/issues). If it is something new, please [submit an issue](https://github.com/seegno/uphold-sdk-php/issues/new).\n\n#### Develop\n\nIt will be awesome if you can help us evolve `uphold-sdk-php`. Want to help?\n\n1. [Fork it](https://github.com/seegno/uphold-sdk-php).\n2. `php composer.phar install`.\n3. Hack away.\n4. Run the tests: `phpunit`.\n5. Create a [Pull Request](https://github.com/seegno/uphold-sdk-php/compare).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fseegno%2Fuphold-sdk-php","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fseegno%2Fuphold-sdk-php","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fseegno%2Fuphold-sdk-php/lists"}