PHPackages                             kidacallos/coinsph-sdk - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. kidacallos/coinsph-sdk

ActiveLibrary[API Development](/categories/api)

kidacallos/coinsph-sdk
======================

A laravel package wrapper for integrating with CoinsPH API

10PHP

Since Jun 7Pushed 11mo agoCompare

[ Source](https://github.com/kennethdacallos/coinsph-sdk)[ Packagist](https://packagist.org/packages/kidacallos/coinsph-sdk)[ RSS](/packages/kidacallos-coinsph-sdk/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

CoinsPH SDK
===========

[](#coinsph-sdk)

[![MIT Licensed](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE)

A Laravel package wrapper for integrating with CoinsPH API. This package provides a simple and elegant way to interact with CoinsPH's payment services.

Features
--------

[](#features)

- Cash out operations
- QR code generation for deposits
- QR code status verification
- Fiat order details retrieval
- Deposit and withdrawal validation
- Secure API authentication with signatures

Requirements
------------

[](#requirements)

- PHP 8.0 or higher
- Laravel 8.0 or higher
- GuzzleHTTP 7.9 or higher
- Illuminate/Support 12.17 or higher

Installation
------------

[](#installation)

You can install the package via composer:

```
composer require kidacallos/coinsph-sdk
```

Configuration
-------------

[](#configuration)

1. First, set up your CoinsPH API credentials. You'll need:

    - API Key
    - Secret Key
    - API URL
2. Initialize the SDK and configure your vault:

```
use Kidacallos\CoinsPhSdk\CoinsPh;

$coinsPh = new CoinsPh();
$coinsPh->setVault([
    'api_key' => 'your_api_key',
    'secret_key' => 'your_secret_key',
    'api_url' => 'https://api.coins.ph/v1'
]);
```

Usage
-----

[](#usage)

### Cash Out Operation

[](#cash-out-operation)

```
try {
    $response = $coinsPh
        ->validateWithdrawal([
            'amount' => '1000.00',
            'currency' => 'PHP',
            // Add other required withdrawal parameters
        ])
        ->cashOut();

    // Handle successful response
} catch (VaultNotFoundException $e) {
    // Handle vault configuration error
} catch (FailedResponseException $e) {
    // Handle API request failure
} catch (InvalidArgumentException $e) {
    // Handle validation errors
}
```

### Generate QR Code for Deposit

[](#generate-qr-code-for-deposit)

```
try {
    $response = $coinsPh
        ->validateDeposit([
            'amount' => '1000.00',
            'currency' => 'PHP',
            // Add other required deposit parameters
        ])
        ->generateQRCode();

    // Handle QR code response
} catch (Exception $e) {
    // Handle errors
}
```

### Check QR Code Status

[](#check-qr-code-status)

```
$isValid = $coinsPh->getQRCodeStatus('request_id_here');
```

### Get Fiat Order Details

[](#get-fiat-order-details)

```
$orderExists = $coinsPh->getFiatOrderDetail('internal_order_id_here');
```

Response Handling
-----------------

[](#response-handling)

The package returns responses as `CoinsPhResponse` objects which provide methods to access:

- Response status
- Payload data
- Error messages
- Raw response

Error Handling
--------------

[](#error-handling)

The package throws the following exceptions:

- `VaultNotFoundException`: When API credentials are not configured
- `FailedResponseException`: When an API request fails
- `InvalidArgumentException`: When validation fails for deposit/withdrawal payloads

Security
--------

[](#security)

The package automatically handles:

- API authentication
- Request signatures
- Secure HTTP headers

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING.md](CONTRIBUTING.md) for details.

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE) for more information.

Author
------

[](#author)

- Kenneth I. Dacallos ()

###  Health Score

15

—

LowBetter than 3% of packages

Maintenance38

Infrequent updates — may be unmaintained

Popularity2

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity14

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/2fb8da37e3450473f833a5c6cae26c64779f80d88ae6a2eee956f67a88958853?d=identicon)[kennethdacallos](/maintainers/kennethdacallos)

---

Top Contributors

[![kennethdacallos](https://avatars.githubusercontent.com/u/34506049?v=4)](https://github.com/kennethdacallos "kennethdacallos (2 commits)")

### Embed Badge

![Health badge](/badges/kidacallos-coinsph-sdk/health.svg)

```
[![Health](https://phpackages.com/badges/kidacallos-coinsph-sdk/health.svg)](https://phpackages.com/packages/kidacallos-coinsph-sdk)
```

###  Alternatives

[stripe/stripe-php

Stripe PHP Library

4.0k143.3M475](/packages/stripe-stripe-php)[twilio/sdk

A PHP wrapper for Twilio's API

1.6k92.9M270](/packages/twilio-sdk)[knplabs/github-api

GitHub API v3 client

2.2k15.8M187](/packages/knplabs-github-api)[facebook/php-business-sdk

PHP SDK for Facebook Business

90121.9M34](/packages/facebook-php-business-sdk)[meilisearch/meilisearch-php

PHP wrapper for the Meilisearch API

73813.7M114](/packages/meilisearch-meilisearch-php)[google/gax

Google API Core for PHP

263103.1M452](/packages/google-gax)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
