Getting Started
This guide gets you from zero to your first API call in a few minutes.
1. Get API credentials
Create API keys from the Peak Gateway dashboard:
- Test key for sandbox transactions
- Live key for production processing
Keep keys server-side and never expose them in frontend code.
2. Install an SDK
TypeScript
npm install @gateway/sdk
Kotlin / Android
Use:
gateway-sdk-androidgateway-sdk-core
from the sdks/ workspace packages.
3. Create a checkout session
curl -X POST "https://pay.peakgateway.co/api/v1/checkout/sessions" \
-H "Authorization: Bearer <YOUR_TEST_API_KEY>" \
-H "Content-Type: application/json" \
-d '{
"amount": 4999,
"currency": "USD",
"successUrl": "https://example.com/success",
"cancelUrl": "https://example.com/cancel",
"lineItems": [
{ "description": "Starter plan", "quantity": 1, "unitAmount": 4999 }
],
"locationId": "loc_123"
}'
4. Use the SDKs for payment operations
The TypeScript and Kotlin SDKs target the current api.*, pay.*, and auth
domains directly. Use GatewayPayClient for checkout and payment-facing flows
and GatewayAdminClient for management and portal operations.
Next steps
- Review the generated OpenAPI reference
- Configure webhooks for async state changes
- Add subscriptions for recurring billing
- Reconcile settlement batches daily