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 2w ago

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

30

—

LowBetter than 62% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity65

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

2050d ago

Major Versions

v1.0.3 → v2.0.02020-11-18

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/8751701?v=4)[cardcash](/maintainers/cardcash)[@cardcash](https://github.com/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

[exsyst/swagger

A php library to manipulate Swagger specifications

35816.3M7](/packages/exsyst-swagger)[hubspot/api-client

Hubspot API client

24015.5M18](/packages/hubspot-api-client)[pocketmine/bedrock-protocol

An implementation of the Minecraft: Bedrock Edition protocol in PHP

172437.8k11](/packages/pocketmine-bedrock-protocol)[botman/driver-telegram

Telegram driver for BotMan

94452.6k6](/packages/botman-driver-telegram)

PHPackages © 2026

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