Overview
The Payments APIs provide comprehensive payment processing capabilities for the TalentG platform, including order creation, payment verification, coupon management, and billing operations using Razorpay as the payment gateway.Base URL
Authentication
All payment endpoints require user authentication. Users must be signed in to create orders or access billing information.Order Management
Create Payment Order
Verify Payment
Coupon Management
Validate Coupon
Apply Coupon
Webhook Handling
Razorpay Webhook
Payment Configuration
Supported Features
The following features/services support payment processing:| Feature Key | Description | Base Price (INR) |
|---|---|---|
strength_finder | Strength Finder Assessment | ₹499 |
premium_support | Premium Support Access | ₹999 |
advanced_analytics | Advanced Analytics Dashboard | ₹1999 |
Pricing Modes
- inclusive: Tax included in base price
- exclusive: Tax added to base price
Supported Currencies
- INR: Indian Rupee (primary)
- USD: US Dollar (international users)
Tax Calculation
The system automatically calculates taxes based on:- CGST: 9% (for Indian transactions)
- SGST: 9% (for Indian transactions)
- IGST: 18% (for international transactions)
Tax rates are configured per payment feature and can be updated through the admin panel.
Coupon Types
Percentage Discount
Fixed Amount Discount
Free Access
Error Handling
Common Error Codes
| Code | HTTP Status | Description |
|---|---|---|
UNAUTHORIZED | 401 | User not authenticated |
INVALID_REQUEST | 400 | Invalid request parameters |
FEATURE_NOT_ACTIVE | 404 | Requested feature not available |
INVALID_COUPON | 400 | Coupon code is invalid or inactive |
COUPON_EXPIRED | 400 | Coupon has expired |
COUPON_LIMIT_REACHED | 400 | Coupon usage limit exceeded |
ORDER_CREATION_FAILED | 500 | Failed to create payment order |
PAYMENT_VERIFICATION_FAILED | 400 | Payment verification failed |
Error Response Format
Rate Limiting
- Create order: 10 requests per hour per user
- Verify payment: 50 requests per hour per user
- Coupon validation: 100 requests per hour per user
- Webhooks: Unlimited (system endpoint)
SDK Examples
Payment Flow
- Create Order: Client requests payment order with feature and optional coupon
- Order Validation: System validates feature availability and coupon eligibility
- Amount Calculation: Base amount, discounts, and taxes are calculated
- Razorpay Order: Razorpay order is created (unless free access)
- Payment: User completes payment through Razorpay checkout
- Verification: Payment is verified and entitlements are granted
- Access: User gains access to the purchased feature
Always verify payments on the server side using the
/api/payments/verify endpoint. Never trust client-side payment confirmations.