Loading...
Loading...
Comprehensive APIs and SDKs to integrate global payment infrastructure into any application. Accept on-chain stablecoin payments, manage subscriptions, and build marketplace experiences β all on the Arc blockchain.
$ npm install @insfers/sdk
$ curl https://api.insfers.com/v3/payments \
-H "Authorization: Bearer sk_test_..." \
-d amount=1000 -d currency=usdc -d chain=arcFrom zero to processing payments in five straightforward steps.
Sign up at dashboard.insfers.com and grab your test API keys from the developer settings panel.
Add the Insfers SDK to your project using your preferred package manager.
Use the Payments API to create a charge. Specify the amount in the smallest currency unit (cents).
Set up a webhook endpoint to receive real-time notifications when payments succeed or fail.
Switch from test keys to live keys in your dashboard. No code changes required.
npm install @insfers/sdkimport Insfers from '@insfers/sdk';
const insfers = new Insfers('sk_test_your_key_here');
// Create a payment
const payment = await insfers.payments.create({
amount: 2500, // $25.00 in USDC
currency: 'usdc',
chain: 'arc',
description: 'Order #1234',
metadata: {
order_id: '1234',
customer_email: 'customer@example.com',
},
});
console.log(payment.id); // pay_abc123
console.log(payment.status); // "pending"
console.log(payment.checkout_url); // redirect customer hereRESTful APIs with predictable resource-oriented URLs, JSON request and response bodies, and standard HTTP methods.
Create, confirm, capture, and retrieve payments. Supports one-time and recurring charges with full lifecycle management.
Issue full or partial refunds on completed payments. Track refund status and receive webhook notifications.
Store customer profiles, payment methods, and transaction history. Link customers to subscriptions and invoices.
Build advanced checkout flows with multi-step confirmation. Handle 3DS authentication and wallet selection.
Generate and send professional invoices. Auto-collect payments and track outstanding balances.
Manage recurring billing with plans, trials, proration, and usage-based pricing. Automatic retries on failed payments.
Power marketplace and platform payments. Onboard connected accounts, split payments, and manage payouts.
All endpoints support pagination, filtering, and expanding nested objects.
Explore Full API DocsOfficial client libraries in 7 languages. Fully typed, well-documented, and open source.
Missing your language? Request it on GitHub or use our REST API directly.
Receive real-time notifications for every event in your payment lifecycle. Signed, retried, and delivered in order.
payment.createdpayment.completedpayment.failedpayment.expiredrefund.createdrefund.completedcustomer.createdcustomer.updatedsubscription.createdsubscription.renewedsubscription.canceledinvoice.paidinvoice.overduepayout.completedconnect.account.updatedimport Insfers from '@insfers/sdk';
import express from 'express';
const app = express();
const insfers = new Insfers('sk_test_your_key_here');
app.post('/webhooks/insfers', express.raw({ type: 'application/json' }), (req, res) => {
const signature = req.headers['insfers-signature'];
let event;
try {
event = insfers.webhooks.verify(req.body, signature, 'whsec_your_secret');
} catch (err) {
console.error('Webhook signature verification failed:', err.message);
return res.status(400).send('Invalid signature');
}
switch (event.type) {
case 'payment.completed':
const payment = event.data;
console.log('Payment succeeded:', payment.id);
// Fulfill the order
break;
case 'payment.failed':
console.log('Payment failed:', event.data.id);
// Notify the customer
break;
case 'refund.created':
console.log('Refund initiated:', event.data.id);
break;
default:
console.log('Unhandled event type:', event.type);
}
res.json({ received: true });
});
app.listen(3000);Build and test with confidence using our full-featured sandbox environment. No real money, no risk.
All keys prefixed with sk_test_ operate in sandbox mode. Switch to sk_live_ when you are ready to go to production.
Use test wallet addresses to simulate successful payments, declines, and edge cases without spending real USDC.
Fast-forward time to test subscription renewals, invoice due dates, and trial expirations.
Trigger test webhook events from the dashboard or CLI. Inspect payloads and debug delivery issues.
Force specific error codes and network conditions to verify your error handling and retry logic.
Test idempotent requests safely. Replay operations to verify your integration handles duplicates correctly.
| Wallet Address | Behavior | Use Case |
|---|---|---|
0xTEST_SUCCESS_0001 | Payment succeeds | Happy path testing |
0xTEST_DECLINE_0002 | Payment declined | Decline handling |
0xTEST_PENDING_0003 | Payment stays pending | Async flow testing |
0xTEST_TIMEOUT_0004 | Network timeout | Retry logic validation |
0xTEST_PARTIAL_0005 | Partial payment | Underpayment handling |
Copy-paste examples for the most common integration patterns.
Redirect customers to a secure, Insfers-hosted payment page. No frontend code needed β we handle the entire checkout UI, wallet connection, and confirmation flow.
// Create a hosted checkout session
const session = await insfers.checkout.sessions.create({
line_items: [
{
name: 'Pro Plan',
amount: 4900,
quantity: 1,
},
],
success_url: 'https://yoursite.com/success?session_id={SESSION_ID}',
cancel_url: 'https://yoursite.com/cancel',
});
// Redirect the customer
res.redirect(303, session.url);Build subscription billing with automatic renewals, proration, trials, and smart retries for failed payments. Supports both fixed-price and usage-based models.
// Create a customer
const customer = await insfers.customers.create({
email: 'customer@example.com',
name: 'Jane Doe',
});
// Create a subscription
const subscription = await insfers.subscriptions.create({
customer: customer.id,
plan: 'plan_pro_monthly',
payment_method: 'pm_card_visa',
});
console.log(subscription.status); // "active"
console.log(subscription.current_period_end);Issue full or partial refunds programmatically. Refunds settle on-chain and are tracked in your dashboard with complete audit trails.
// Full refund
const refund = await insfers.refunds.create({
payment: 'pay_abc123',
});
// Partial refund
const partialRefund = await insfers.refunds.create({
payment: 'pay_abc123',
amount: 500, // Refund $5.00 of the original amount
reason: 'customer_request',
});
console.log(refund.status); // "succeeded"Power multi-party payments for platforms and marketplaces. Onboard sellers, split payments, and handle payouts automatically with Insfers Connect.
// Create a connected account
const account = await insfers.connect.accounts.create({
type: 'standard',
email: 'seller@marketplace.com',
capabilities: {
payments: { requested: true },
payouts: { requested: true },
},
});
// Create a split payment
const payment = await insfers.payments.create({
amount: 10000,
currency: 'usdc',
chain: 'arc',
transfer_data: {
destination: account.id,
amount: 8500, // Seller receives $85.00, platform keeps $15.00
},
});Connect with thousands of developers building on Insfers. Get help, share ideas, and contribute to the ecosystem.
Technical deep dives, integration guides, and product updates from the engineering team.
Read BlogEvery plan includes documentation access and community support. Upgrade for faster response times and dedicated assistance.
Comprehensive guides, API reference, tutorials, and code examples.
Get help from other developers and Insfers engineers on Discord and Stack Overflow.
Direct support from the Insfers engineering team via email with 24-hour response times.
Fast-track support for production issues with guaranteed response times.
White-glove support with a dedicated solutions engineer and custom SLAs.
Get your API keys in seconds. No credit card required. Full sandbox access with test mode so you can build and iterate before going live.