API Reference Overview
Complete reference for the Pelago REST API.
Base URL
| Environment | URL |
|---|---|
| Production | https://api.pelago.tech/v1 |
| Sandbox | https://api.sandbox.pelago.tech/v1 |
Authentication
curl https://api.pelago.tech/v1/payments \
-H "Authorization: Bearer pk_live_xxxxx" \
-H "X-Api-Secret: sk_live_xxxxx"
Response Format
All responses are JSON:
{
"id": "pay_abc123",
"object": "payment",
"status": "completed",
...
}
Pagination
{
"object": "list",
"data": [...],
"hasMore": true,
"totalCount": 100
}
Errors
{
"error": {
"type": "invalid_request_error",
"code": "missing_parameter",
"message": "The 'amount' parameter is required"
}
}
Endpoints
Payments
| Method | Endpoint | Description |
|---|---|---|
POST | /payments | Create payment |
GET | /payments/:id | Get payment |
GET | /payments | List payments |
POST | /payments/:id/cancel | Cancel payment |
Refunds
| Method | Endpoint | Description |
|---|---|---|
POST | /refunds | Create refund |
GET | /refunds/:id | Get refund |
GET | /refunds | List refunds |
Settlements
| Method | Endpoint | Description |
|---|---|---|
GET | /settlements | List settlements |
GET | /settlements/:id | Get settlement |
Webhooks
| Method | Endpoint | Description |
|---|---|---|
POST | /webhooks | Create webhook |
GET | /webhooks | List webhooks |
DELETE | /webhooks/:id | Delete webhook |
Rate Limits
| Plan | Limit |
|---|---|
| Sandbox | 100/min |
| Starter | 500/min |
| Business | 2000/min |
See REST API Reference for detailed documentation.