SDKs & Libraries
Use our official SDKs to integrate ClapPay into your app. Available for all major programming languages and platforms.
Server-Side SDKs
Use these on your server to create payments, manage subscriptions, issue refunds, and more.
Node.js
npm install @clappay/sdkWorks with Express, Next.js, NestJS, and any Node.js project.
Python
pip install clappayWorks with Django, Flask, FastAPI, and any Python project.
PHP
composer require clappay/clappay-phpWorks with Laravel, Symfony, WordPress, and any PHP project.
Ruby
gem install clappayWorks with Rails and any Ruby project.
Go
go get github.com/clappay/clappay-goWorks with any Go project.
Java
com.clappay:clappay-javaWorks with Spring Boot, Quarkus, and any Java project.
.NET
dotnet add package ClapPay.NetWorks with ASP.NET Core and any .NET project.
Mobile SDKs
Build native payment experiences in iOS, Android, and cross-platform apps.
iOS (Swift)
pod 'ClapPay'Native iOS SDK with Apple Pay support.
Android
implementation 'com.clappay:clappay-android'Native Android SDK with Google Pay support.
Flutter
flutter pub add clappay_sdkCross-platform Flutter SDK for iOS and Android.
React Native
npm install @clappay/react-nativeReact Native SDK for iOS and Android.
Frontend SDK
Use ClapPay.js on your website to securely collect payment information.
Add to your HTML
<script src="https://js.clappay.com/v1/"></script>
Or install via npm:
npm install @clappay/jsE-commerce Plugins
No coding required! Install our plugins for popular e-commerce platforms.
WooCommerce
For WordPress stores
Shopify
Install from App Store
Magento
Adobe Commerce ready
Quick Example
Here's how to create a payment with our Node.js SDK:
const clappay = require('@clappay/sdk')('sk_live_...');
// Create a payment
const payment = await clappay.paymentIntents.create({
amount: 2000, // $20.00
currency: 'usd',
payment_method_types: ['card'],
description: 'Order #12345',
});
console.log('Payment created:', payment.id);
// Create a customer
const customer = await clappay.customers.create({
email: 'customer@example.com',
name: 'Jane Smith',
});
// Create a subscription
const subscription = await clappay.subscriptions.create({
customer: customer.id,
items: [{ price: 'price_monthly_plan' }],
});
console.log('Subscription started:', subscription.id);Best Practices
- Keep SDKs updated - We release fixes and new features regularly. Check for updates monthly.
- Use server-side SDKs for secrets - Never put your secret API key in frontend code.
- Handle errors - Always wrap SDK calls in try/catch and handle errors gracefully.
- Use TypeScript types - Our JavaScript SDK includes full TypeScript definitions.
- Test in sandbox - Use test API keys during development.
ClapPay CLI
Our command-line tool helps with development and testing:
npm install -g @clappay/cliUse it to:
- Forward webhooks to your local development server
- Trigger test events
- View logs and API requests
- Manage API keys