PHPackages                             cardcash/cardcash-api-sdk-php - 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. cardcash/cardcash-api-sdk-php

ActiveLibrary[API Development](/categories/api)

cardcash/cardcash-api-sdk-php
=============================

CardCash Client Facing API SDK For Partners using PHP

v2.0.0(5y ago)02872PHP

Since Jan 4Pushed 5y ago7 watchersCompare

[ Source](https://github.com/CardCashLLC/CardCash_API_SDK_PHP)[ Packagist](https://packagist.org/packages/cardcash/cardcash-api-sdk-php)[ RSS](/packages/cardcash-cardcash-api-sdk-php/feed)WikiDiscussions master Synced today

READMEChangelog (2)DependenciesVersions (6)Used By (0)

CardCash API SDK PHP
====================

[](#cardcash-api-sdk-php)

This is currently a simple CardCash API SDK written in PHP to assist bulk seller partners in communicating with CardCash Client API.

Dependencies
------------

[](#dependencies)

- PHP (&gt;= 5.3)

Install
-------

[](#install)

Package Manager

`composer require cardcash/cardcash-api-sdk-php`

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

[](#requirements)

1. CardCash Bulk Seller Agreement
2. CardCash X-CC-APP-ID
3. Bulk Seller Customer Account ( Sandbox can be created via this SDK )
4. Default Bank Account w/ Default Payment Method for Bulk Seller Customer Account

Methods
-------

[](#methods)

- `CustomerLogin(string email, string password)` - Logins a customer into their account.
- `CreateCustomer(string firstName, string lastName, string email, string password)` - Will Only Create a brand new customer account in sandbox.
- `GetDefaultPaymentOptions` - Gets a list of a customer default payment options.
- `GetCustomer` - Get your customer profile, this is used to get your paymentDetailID to place a order.
- `GetMerchants` - Get a list of currently accepted merchants with merchant sell percentages agreed upon with your Account Manager, you must be LOGGED IN to see your sell percentages.
- `RetrieveCart` - Will return a cart if one exists in the system.
- `CreateCart` - Will return a cart if one exists in the system with it's cards or create a new empty cart.
- `DeleteCart(string cartID)` - Delete an entire cart.
- `AddCardToCart(string cartID, int merchantID, double cardValue, string cardNum = null, string cardPin = null, string refID = null)` - Add Cart to a Cart, Cards must be added one-by-one there is no bulk method.
- `UpdateCardInCart(string cartID, string cardID, double cardValue = 0, string cardNum = null, string cardPin = null, string refID = null)` - Update a Card in a cart.
- `DeleteCardInCart(string cartID, string cardID)` - Delete a given card in a cart.
- `PlaceOrder(string cartID, int paymentDetailID, string firstName, string lastName, string street, string city, string state, string postcode, string street2 = null)` - Place your order.
- `GetOrder(string orderID)` - Get a single order details using the orders id
- `GetAllOrders` - Get a list of orders you've placed to CardCash.
- `GetOrderCards(string orderID)` - Get a list of cards associated with a given order
- `GetAllCards` - Get a list of all the cards that you've sold to CardCash.
- `GetAllPayments` - Get a summary of all the Payments paid to you.
- `GetPayment(string paymentID)` - Get more details for single payment.

Note: All Optional Parameters are set to null or 0.

Order Status
------------

[](#order-status)

- Pending - Your order is pending and is waiting for the payment to be processed.
- Review2 - Cards are going through the various checks required for sale.
- Review3 - Possible balance issues
- Review - This is where we enter it into our inventory system/ or order has an issue and customer will be contacted
- Processing - Your order is being prepared for shipment.
- On Payment Queue - Payment is being processed
- Payment Initiated - Payment sent to customer
- Paid - Customer has been successfully paid

Note: Pending is the only available order status in Sandbox.

Usage
-----

[](#usage)

You need to import the `CardCash_API` library

You need to initialize a new API class `API(string appID, Boolean isProduction = false, Boolean debug = false)`

To Create new connection to sandbox: `$CC_API = new API(appID, false, false);`

To Create new connection to production: `$CC_API = new API(appID, true, false);`

To debug CardCash Cookies with CardCash help: `$CC_API = new API(appID, false, true);`

IT IS HIGHLY RECOMMENDED TO ALWAYS START WITH A `CUSTOMER LOGIN` CALL - YOU CAN'T GET YOUR MERCHANT PRICING, SAVE YOUR CART, OR PLACE A ORDER WITHOUT BEING LOGGED IN!

`$CC_API->CustomerLogin(emailAddr, pwd);`

Examples
--------

[](#examples)

[Get Orders &amp; Get Cards](https://github.com/CardCashLLC/CardCash_API_SDK_PHP/blob/master/examples/getOrders.php)

[Place a Order](https://github.com/CardCashLLC/CardCash_API_SDK_PHP/blob/master/examples/placeOrder.php)

###  Health Score

29

—

LowBetter than 60% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity64

Established project with proven stability

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.

###  Release Activity

Cadence

Every ~171 days

Total

5

Last Release

1998d ago

Major Versions

v1.0.3 → v2.0.02020-11-18

### Community

Maintainers

![](https://www.gravatar.com/avatar/6714b0590de18f080652da235afff912952843f424b542654c560397fb7cbd30?d=identicon)[cardcash](/maintainers/cardcash)

### Embed Badge

![Health badge](/badges/cardcash-cardcash-api-sdk-php/health.svg)

```
[![Health](https://phpackages.com/badges/cardcash-cardcash-api-sdk-php/health.svg)](https://phpackages.com/packages/cardcash-cardcash-api-sdk-php)
```

###  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)
