SDKs
Our official SDKs make it easy to integrate with the Crumb API. They handle authentication, retries, and error handling so you can focus on building your integration.
JS
Node.js
Official Node.js SDK for server-side JavaScript and TypeScript.
npm install @crumbpos/node PY
Python
Official Python SDK for Python 3.8+.
pip install crumbpos RB
Ruby
Official Ruby SDK for Ruby 3.0+.
gem install crumbpos PHP
PHP
Official PHP SDK for PHP 8.0+.
composer require crumbpos/crumbpos-php Node.js SDK
Installation
npm install @crumbpos/node Quick Start
index.ts
import Crumb from '@crumbpos/node';
const crumb = new Crumb('sk_test_...');
// List orders
const orders = await crumb.orders.list({
status: 'open',
limit: 10
});
// Create an order
const order = await crumb.orders.create({
location_id: 'loc_abc123',
items: [
{ menu_item_id: 'mi_xyz789', quantity: 2 }
]
});
// Handle webhooks
import { verifyWebhook } from '@crumbpos/node';
app.post('/webhooks', (req, res) => {
const event = verifyWebhook(
req.body,
req.headers['crumb-signature'],
'whsec_...'
);
if (event.type === 'order.created') {
// Handle new order
}
res.status(200).send('OK');
}); Python SDK
Installation
pip install crumbpos Quick Start
app.py
import crumbpos
crumb = crumbpos.Client('sk_test_...')
# List orders
orders = crumb.orders.list(status='open', limit=10)
# Create an order
order = crumb.orders.create(
location_id='loc_abc123',
items=[
{'menu_item_id': 'mi_xyz789', 'quantity': 2}
]
)
# Handle webhooks
from crumbpos.webhook import verify_webhook
@app.route('/webhooks', methods=['POST'])
def handle_webhook():
event = verify_webhook(
request.data,
request.headers['Crumb-Signature'],
'whsec_...'
)
if event['type'] == 'order.created':
# Handle new order
pass
return 'OK', 200 SDK Features
All official SDKs include:
- Type safety: Full TypeScript/type hints support
- Automatic retries: Failed requests are automatically retried with exponential backoff
- Pagination helpers: Easy iteration over paginated results
- Webhook verification: Built-in signature verification
- Error handling: Typed errors for different failure scenarios
Postman Collection
We provide a Postman collection for exploring the API interactively. Import it into Postman to try out endpoints without writing code.
Download Postman Collection
After importing:
- Set your API key in the collection variables
- Select an environment (Test or Live)
- Start making requests!
Community SDKs
These SDKs are maintained by the community:
- crumb-go - Go SDK by @developer
- crumb-java - Java SDK by @developer
- crumb-dotnet - .NET SDK by @developer
Community SDKs
Community SDKs are not officially supported by Crumb. Use them at your own discretion.
Need Help?
If you run into issues with our SDKs, please open an issue on GitHub or contact developers@crumbpos.com.