One-Time Payments
Accept single, non-recurring payments for products and services.
1
What are One-Time Payments?
One-time payments are single, non-recurring transactions. Use them for one-off purchases, services, donations, or any payment that doesn't repeat.
**Use Cases:**
- Single product purchases
- Service payments (consulting, freelance work)
- Donations and tips
- Event tickets
- Any transaction that doesn't need recurring billing2
Creating a One-Time Payment Link
Create a simple payment link:
```typescript
await createCheckoutLink("biz_your_business_id", {
planName: "Logo Design Package",
plan: "logo-design",
description: "Professional logo design with 3 concepts",
price: "350.00",
billing: "one-time",
initialFee: "", // No upfront charge
trial: "", // No trial (one-time payments don't need trials)
stock: "", // Unlimited until you set a limit
});
```
**With Stock Limit:**
```typescript
await createCheckoutLink("biz_your_business_id", {
planName: "Limited Edition NFT",
plan: "nft-limited",
description: "Exclusive limited edition NFT (50 available)",
price: "0.50", // 0.50 USDC
billing: "one-time",
stock: "50", // Only 50 available
});
```3
One-Time vs Recurring
| Feature | One-Time | Recurring |
|---------|----------|-----------|
| Billing | Single charge | Multiple charges |
| Use Case | Products, services | Subscriptions |
| Trial | Not applicable | Supported |
| Stock | Per-transaction limit | Per-subscriber limit |
| Examples | Logo design, tickets | Monthly access, SaaS |
**Choosing the Right Option:**
- Use **one-time** for single purchases or services
- Use **recurring** for subscriptions and ongoing access4
Accepting Donations
Set up a donation page with flexible amounts:
```tsx
// Donation component with amount selection
export function DonationForm({ bizId }: { bizId: string }) {
const [amount, setAmount] = useState("10");
const [loading, setLoading] = useState(false);
async function handleDonate() {
setLoading(true);
await createCheckoutLink(bizId, {
planName: `Donation - ${amount}`,
plan: `donation-${Date.now()}`,
description: "Thank you for your support!",
price: amount,
billing: "one-time",
});
setLoading(false);
}
return (
<div>
<label className="text-sm font-medium">Select amount:</label>
<div className="mt-2 flex gap-2">
{["5", "10", "25", "50"].map((a) => (
<button
key={a}
onClick={() => setAmount(a)}
className={`rounded-lg px-4 py-2 ${amount === a ? "bg-primary text-white" : "bg-muted"}`}
>
${a}
</button>
))}
</div>
<button
onClick={handleDonate}
disabled={loading}
className="mt-4 w-full rounded-lg bg-primary px-6 py-3 text-white"
>
{loading ? "Processing..." : "Donate"}
</button>
</div>
);
}
```Best Practices
Clear Pricing
Display the exact amount and what it covers. Avoid hidden fees.
Confirmation
Send a confirmation message or email after successful payment.
Receipts
Consider generating and sending receipts for business payments.