Payment Service API
Welcome to the Payment Service API documentation. This API allows you to process payments, manage subscriptions, and handle refunds.
Authentication
All API requests require a valid API key passed in the Authorization header.
You can generate an API key from the developer settings page.
Endpoints
Create Payment
Creates a new payment intent.
POST /api/v1/payments
Content-Type: application/json
{
"amount": 5000,
"currency": "usd",
"description": "Order #1234"
}
Get Payment Status
Retrieves the current status of a payment.
GET /api/v1/payments/{payment_id}
Error Handling
The API uses standard HTTP status codes. All error responses include a JSON body with error and message fields.
- 400 - Bad Request: Invalid parameters
- 401 - Unauthorized: Missing or invalid API key
- 404 - Not Found: Resource does not exist
- 429 - Too Many Requests: Rate limit exceeded
- 500 - Internal Server Error
Rate Limits
API requests are limited to 100 requests per minute per API key. Exceeding this limit will result in a 429 response.