API & SDKs¶
The 4Geeks API lets you integrate payments, customers, subscriptions, and other platform capabilities into your own product. This section covers authentication, endpoints, SDKs, and the sandbox.
Summary
Base URL: https://api.4geeks.io
Authentication: X-Api-Key header
Testing: free, unlimited sandbox.
Start here¶
Authentication
Create API keys and authenticate requests safely.
📚API reference
Explore every endpoint with request and response schemas.
🧪Testing cards
Simulate approvals, declines, and 3DS flows in sandbox.
📟Response codes
Interpret HTTP status codes and error payloads.
📦SDKs
Official libraries and examples for common stacks.
💳Payments API
Create charges, payment intents, and checkout sessions.
How the API works¶
sequenceDiagram
participant App as Your app
participant API as 4Geeks API
participant Bank as Card network
App->>API: POST /v1/payments (X-Api-Key)
API->>Bank: Authorize charge
Bank-->>API: Approved or declined
API-->>App: Payment object + status
API->>App: Webhook (payment.succeeded) Sandbox environment¶
The sandbox is a safe, isolated environment for testing without moving real money. Run unlimited simulations to verify that your business logic handles every scenario before going live.
When you create your account, you get access to the Console, where you can:
- View analytics for your payment flows.
- Watch transactions and events as they happen.
- Inspect payload details to confirm your integration behaves as expected.
Sandbox is free and unlimited
Sandbox data is separate from production data. Use your sandbox API keys while testing, and switch to production keys only when you are ready to go live.
Conventions¶
- JSON for request and response bodies.
- API key in the
X-Api-Keyheader. - Idempotency for safe retries on payment-creating requests.
- Pagination with
limitandoffset. - Webhooks for asynchronous events.
Related¶
Still have questions? Ask on Discord or explore the tutorials.