Complete guide to integrating with KPEI API
Welcome to KPEI API documentation. Follow these steps to get started:
Sign up for a KPEI API account to get your API keys and access to our services.
Once registered, you'll receive:
Use the following sample code to make your first API call:
curl -X POST https://kpei-stg.api.bawana.com/v1/payment/initiate \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-d '{
"amount": 1000,
"currency": "USD",
"description": "Test payment"
}'
KPEI API uses OAuth 2.0 Bearer tokens for authentication. Include your API key in the Authorization header:
Authorization: Bearer YOUR_API_KEY
For security, all API requests must be made over HTTPS.
Endpoint: POST /v1/payment/initiate
Parameter | Type | Required | Description |
---|---|---|---|
amount | decimal | Yes | Payment amount |
currency | string | Yes | 3-letter currency code |
description | string | Yes | Payment description |
{
"status": "success",
"data": {
"transaction_id": "txn_123456789",
"payment_url": "https://pay.kpei-stg.api.bawana.com/txn_123456789",
"expires_at": "2023-12-31T23:59:59Z"
}
}
Endpoint: POST /v1/data/send
This endpoint allows you to send data to be synchronized with other systems.
Parameter | Type | Required | Description |
---|---|---|---|
data_type | string | Yes | Type of data being sent |
payload | object | Yes | Data payload |
webhook_url | string | No | URL for webhook notifications |
Endpoint: POST /v1/identity/verify
Verify user identity using various methods including document verification and biometric authentication.
Parameter | Type | Required | Description |
---|---|---|---|
verification_type | string | Yes | Type of verification (document, biometric) |
user_data | object | Yes | User information for verification |
Code | Message | Description |
---|---|---|
200 | Success | Request completed successfully |
400 | Bad Request | Invalid request parameters |
401 | Unauthorized | Invalid or missing API key |
403 | Forbidden | Access denied |
404 | Not Found | Resource not found |
500 | Internal Server Error | Server error occurred |