| title | Introduction |
|---|---|
| description | Accept crypto payments on Solana with seven lines of code. Built for developers who ship fast. |
ZendFi is a payment infrastructure platform built on Solana. It gives you everything you need to accept stablecoin and token payments -- subscriptions, invoices, installment plans, payment links, embedded checkout, and more -- through a single, clean API.
No wallet custody. No smart contract deployments. No blockchain plumbing.
You write createPayment({ amount: 50 }), and ZendFi handles the rest.
At a high level, every ZendFi payment follows this flow:
sequenceDiagram
participant App as Your App
participant API as ZendFi API
participant Chain as Solana
participant Webhook as Your Webhook
App->>API: Create payment
API-->>App: Payment ID + checkout URL
Note over App: Customer pays via<br/>checkout or direct transfer
Chain->>API: Transaction detected
API->>API: Verify + settle
API->>Webhook: payment.confirmed event
Webhook-->>API: 200 OK
- Your application creates a payment through the API or SDK.
- The customer completes payment via the hosted checkout, embedded checkout, or a direct Solana transfer.
- ZendFi monitors the blockchain, verifies the transaction, and settles funds to your merchant wallet.
- Your webhook endpoint receives a
payment.confirmedevent so you can fulfill the order.
Non-custodial by default. ZendFi never holds your funds. Payments settle directly to your Solana wallet. You maintain full control of your keys.
Test and live modes. Every API key is scoped to either test (Solana devnet) or live (Solana mainnet). Switch between them by swapping your API key -- the code stays the same.
Gasless transactions. Customers can pay without holding SOL for gas fees. ZendFi sponsors the transaction fees so your checkout flow is frictionless.
Idempotent by design. The SDK automatically generates idempotency keys for write operations. Retries are safe by default.
import { zendfi } from '@zendfi/sdk';
const payment = await zendfi.createPayment({
amount: 50,
description: 'Pro Plan - Monthly',
customer_email: 'customer@example.com',
});
// Redirect to hosted checkout
redirect(payment.payment_url);import { zendfi } from '@zendfi/sdk';
app.post('/api/checkout', async (req, res) => {
const payment = await zendfi.createPayment({
amount: req.body.amount,
description: req.body.description,
});
res.json({ checkout_url: payment.payment_url });
});curl -X POST https://api.zendfi.tech/api/v1/payments \
-H "Authorization: Bearer zfi_test_your_key" \
-H "Content-Type: application/json" \
-d '{
"amount": 50,
"currency": "USD",
"description": "Pro Plan - Monthly"
}'