Get All Settings
Retrieve all platform settings grouped by category.
Example Request
curl -X GET "https://olp-api.nipuntheekshana.com/v1/admin/settings" \
-H "Authorization: Bearer <admin_token>"
Example Response (200)
{
"general": {
"platformName": "Open Pay",
"supportEmail": "support@openpay.com",
"maintenanceMode": false
},
"payments": {
"minimumPaymentAmount": "1.00",
"maximumPaymentAmount": "50000.00",
"platformFeePercent": "1.5",
"supportedNetworks": ["BSC", "Ethereum", "Polygon"],
"supportedTokens": ["USDT", "USDC", "BUSD"]
},
"security": {
"maxLoginAttempts": 5,
"sessionTimeoutMinutes": 30,
"requireTwoFactor": false,
"ipWhitelistEnabled": false
},
"notifications": {
"emailNotificationsEnabled": true,
"webhookRetryAttempts": 3,
"webhookTimeoutSeconds": 30
}
}
Get Settings by Category
The settings category. One of general, payments, security, notifications.
Example Request
curl -X GET "https://olp-api.nipuntheekshana.com/v1/admin/settings/payments" \
-H "Authorization: Bearer <admin_token>"
Example Response (200)
{
"minimumPaymentAmount": "1.00",
"maximumPaymentAmount": "50000.00",
"platformFeePercent": "1.5",
"supportedNetworks": ["BSC", "Ethereum", "Polygon"],
"supportedTokens": ["USDT", "USDC", "BUSD"]
}
Update Settings
Update one or more platform settings. Only the fields provided will be updated.
General platform settings.
The display name of the platform.
Platform support email address.
Enable or disable maintenance mode.
Payment-related settings.
payments.minimumPaymentAmount
Minimum accepted payment amount.
payments.maximumPaymentAmount
Maximum accepted payment amount.
payments.platformFeePercent
Platform fee as a percentage.
Security-related settings.
security.maxLoginAttempts
Maximum failed login attempts before lockout.
security.sessionTimeoutMinutes
Session timeout in minutes.
Notification-related settings.
notifications.emailNotificationsEnabled
Enable or disable email notifications.
notifications.webhookRetryAttempts
Number of retry attempts for failed webhooks.
Example Request
curl -X PUT "https://olp-api.nipuntheekshana.com/v1/admin/settings" \
-H "Authorization: Bearer <admin_token>" \
-H "Content-Type: application/json" \
-d '{
"payments": {
"platformFeePercent": "2.0",
"minimumPaymentAmount": "5.00"
},
"security": {
"maxLoginAttempts": 3
}
}'
Example Response (200)
{
"message": "Settings updated successfully",
"updated": ["payments.platformFeePercent", "payments.minimumPaymentAmount", "security.maxLoginAttempts"]
}
Email Templates
List Email Templates
Retrieve all configured email templates.
curl -X GET "https://olp-api.nipuntheekshana.com/v1/admin/email-templates" \
-H "Authorization: Bearer <admin_token>"
Example Response (200)
{
"data": [
{
"id": "tmpl_001",
"name": "merchant_welcome",
"subject": "Welcome to Open Pay",
"body": "<html>...<p>Welcome, {{merchantName}}!</p>...</html>",
"variables": ["merchantName", "loginUrl"],
"isActive": true,
"createdAt": "2026-01-01T00:00:00Z",
"updatedAt": "2026-03-20T10:00:00Z"
},
{
"id": "tmpl_002",
"name": "withdrawal_approved",
"subject": "Withdrawal Approved",
"body": "<html>...<p>Your withdrawal of {{amount}} has been approved.</p>...</html>",
"variables": ["amount", "currency", "merchantName"],
"isActive": true,
"createdAt": "2026-01-01T00:00:00Z",
"updatedAt": "2026-03-15T08:00:00Z"
}
]
}
Create Email Template
Unique template identifier name (e.g., payment_confirmation).
Email subject line. Supports {{variable}} placeholders.
HTML email body. Supports {{variable}} placeholders.
List of variable names used in the template.
Whether the template is active.
curl -X POST "https://olp-api.nipuntheekshana.com/v1/admin/email-templates" \
-H "Authorization: Bearer <admin_token>" \
-H "Content-Type: application/json" \
-d '{
"name": "kyc_rejected",
"subject": "KYC Application Update",
"body": "<html><body><p>Dear {{merchantName}}, your KYC application has been reviewed. Reason: {{reason}}</p></body></html>",
"variables": ["merchantName", "reason"],
"isActive": true
}'
Example Response (201)
{
"id": "tmpl_003",
"name": "kyc_rejected",
"subject": "KYC Application Update",
"body": "<html><body><p>Dear {{merchantName}}, your KYC application has been reviewed. Reason: {{reason}}</p></body></html>",
"variables": ["merchantName", "reason"],
"isActive": true,
"createdAt": "2026-03-26T10:00:00Z",
"updatedAt": "2026-03-26T10:00:00Z"
}
Update Email Template
The unique email template identifier.
Updated email subject line.
Updated list of variable names.
Enable or disable the template.
curl -X PUT "https://olp-api.nipuntheekshana.com/v1/admin/email-templates/tmpl_003" \
-H "Authorization: Bearer <admin_token>" \
-H "Content-Type: application/json" \
-d '{
"subject": "KYC Application - Action Required",
"isActive": true
}'
Example Response (200)
{
"id": "tmpl_003",
"name": "kyc_rejected",
"subject": "KYC Application - Action Required",
"body": "<html><body><p>Dear {{merchantName}}, your KYC application has been reviewed. Reason: {{reason}}</p></body></html>",
"variables": ["merchantName", "reason"],
"isActive": true,
"createdAt": "2026-03-26T10:00:00Z",
"updatedAt": "2026-03-26T11:30:00Z"
}
Legal Documents
List Legal Documents (Admin)
Retrieve all legal documents including drafts.
curl -X GET "https://olp-api.nipuntheekshana.com/v1/admin/legal-documents" \
-H "Authorization: Bearer <admin_token>"
Example Response (200)
{
"data": [
{
"id": "legal_001",
"type": "terms_of_service",
"title": "Terms of Service",
"content": "## Terms of Service\n\nLast updated: March 2026...",
"version": "2.1",
"isActive": true,
"createdAt": "2026-01-01T00:00:00Z",
"updatedAt": "2026-03-01T00:00:00Z"
},
{
"id": "legal_002",
"type": "privacy_policy",
"title": "Privacy Policy",
"content": "## Privacy Policy\n\nLast updated: March 2026...",
"version": "1.3",
"isActive": true,
"createdAt": "2026-01-01T00:00:00Z",
"updatedAt": "2026-03-10T00:00:00Z"
}
]
}
Create Legal Document
Document type. One of terms_of_service, privacy_policy, aml_policy, refund_policy.
Document content in Markdown format.
Version string (e.g., 1.0, 2.1).
Whether to immediately publish this document. Setting to true deactivates the previous active version of the same type.
curl -X POST "https://olp-api.nipuntheekshana.com/v1/admin/legal-documents" \
-H "Authorization: Bearer <admin_token>" \
-H "Content-Type: application/json" \
-d '{
"type": "refund_policy",
"title": "Refund Policy",
"content": "## Refund Policy\n\nAll refunds are processed within 7 business days...",
"version": "1.0",
"isActive": true
}'
Example Response (201)
{
"id": "legal_003",
"type": "refund_policy",
"title": "Refund Policy",
"content": "## Refund Policy\n\nAll refunds are processed within 7 business days...",
"version": "1.0",
"isActive": true,
"createdAt": "2026-03-26T10:00:00Z",
"updatedAt": "2026-03-26T10:00:00Z"
}
Update Legal Document
The unique legal document identifier.
Updated document content.
Activate or deactivate the document.
curl -X PUT "https://olp-api.nipuntheekshana.com/v1/admin/legal-documents/legal_003" \
-H "Authorization: Bearer <admin_token>" \
-H "Content-Type: application/json" \
-d '{
"content": "## Refund Policy\n\nUpdated: All refunds are processed within 5 business days...",
"version": "1.1"
}'
Example Response (200)
{
"id": "legal_003",
"type": "refund_policy",
"title": "Refund Policy",
"content": "## Refund Policy\n\nUpdated: All refunds are processed within 5 business days...",
"version": "1.1",
"isActive": true,
"createdAt": "2026-03-26T10:00:00Z",
"updatedAt": "2026-03-26T12:00:00Z"
}
Public Active Legal Documents
Retrieve all currently active legal documents. This endpoint is public and does not require authentication.
curl -X GET "https://olp-api.nipuntheekshana.com/v1/legal-documents/active"
Example Response (200)
{
"data": [
{
"id": "legal_001",
"type": "terms_of_service",
"title": "Terms of Service",
"content": "## Terms of Service\n\nLast updated: March 2026...",
"version": "2.1",
"updatedAt": "2026-03-01T00:00:00Z"
},
{
"id": "legal_002",
"type": "privacy_policy",
"title": "Privacy Policy",
"content": "## Privacy Policy\n\nLast updated: March 2026...",
"version": "1.3",
"updatedAt": "2026-03-10T00:00:00Z"
}
]
}