Platform API
The AnySpend Platform API gives you full programmatic control over your payment infrastructure. Build integrations, automate workflows, and let AI agents manage your commerce stack — all through a clean, Stripe-style REST API.Who is this for?
- Developers building custom integrations with AnySpend
- AI agents that create payment links, manage products, or pull analytics
- Automation platforms orchestrating commerce workflows (Zapier, n8n, custom scripts)
- Backend services that need to programmatically create checkout sessions or track transactions
Quick start
Create a payment link in 3 lines:Associating payments with customers
There are two patterns for linking AnySpend payments back to your users:Pattern 1: URL parameters (simple)
Appendclient_reference_id and metadata to your payment link URL:
payment.completed webhook automatically.
Pattern 2: Server-side sessions (enterprise)
Create a checkout session on your backend with full customer context:url field — redirect your customer there to pay. All data is included in the webhook when the payment completes.
Base URL
All API requests are made to:Authentication tiers
The API uses three authentication tiers depending on the endpoint:| Tier | Auth required | Rate limit | Use case |
|---|---|---|---|
| Open | None (IP-based rate limiting) | 5 requests/min per IP | Quick Pay — one-shot payments with no account needed |
| API Key | asp_xxx key via header | 120 requests/min per key | All standard API operations — CRUD on payment links, products, transactions, etc. |
| JWT | Dashboard session token | Standard session limits | Dashboard-only routes (managed automatically by the web app) |
Response format
Every API response follows a consistent Stripe-style format.Single resource
object field tells you the resource type. The id field is a unique identifier.
List of resources
Error response
Deleted resource
Rate limits
Rate limits vary by authentication tier. When you exceed the limit, the API returns a429 status with a rate_limit_error:
| Tier | Limit | Window |
|---|---|---|
| Open (Quick Pay) | 5 requests | 1 minute |
| API Key | 120 requests | 1 minute |
Idempotency
For safe retries onPOST and PATCH requests, include an Idempotency-Key header. Duplicate requests with the same key and body return the cached response. See the Idempotency page for details.
Available resources
Authentication
Create and manage API keys, understand permission levels, and follow security best practices.
Payment Links
Create, update, and manage payment links with items, stats, sessions, and visitor tracking.
Products
Manage your product catalog — create products that can be attached to payment links.
Checkout Sessions
Create and track checkout sessions, monitor payment status, and handle completions.
Transactions
Query transaction history, filter by status, and pull settlement details.
Customers
Track customer wallets, view purchase history, and manage customer records.
Webhooks
Register webhook endpoints to receive real-time notifications for payment events.
Discount Codes
Create and manage discount codes for your payment links.
Next steps
Get your API key
Go to your AnySpend Dashboard under Settings > API Keys and create a key with the permissions you need.
Make your first request
Use the curl example above or your preferred HTTP client to create a payment link.
HypeDuel