Overview
Process a payment request using a specific payment method. This endpoint allows you to handle payment requests with different payment methods like credit cards, digital wallets, or alternative payment options.API Endpoint
Authentication
- HTTP Header:
X-API-Key
with your API key obtained from the dashboard - Content Type:
application/json
Path Parameters
Parameter | Description | Type | Required |
---|---|---|---|
id | Payment request identifier | integer (int64) | YES |
paymentMethod | Payment method to use for processing | PaymentMethod enum | YES |
Payment Methods
The following payment methods are supported:Method | Description | Use Case |
---|---|---|
CREDIT_CARD | Credit/debit card payments | Standard card processing |
APPLE_PAY | Apple Pay digital wallet | iOS/Safari payments |
GOOGLE_PAY | Google Pay digital wallet | Android/Chrome payments |
UPI | Unified Payments Interface | Indian market payments |
BANK_TRANSFER | Direct bank transfers | ACH/wire transfers |
CRYPTOCURRENCY | Digital currency payments | Bitcoin, Ethereum, etc. |
PAYPAL | PayPal wallet payments | PayPal account holders |
Response
Returns payment handling result including:Processing Information
- Status: Payment processing status
- Transaction ID: Generated transaction identifier
- Redirect URL: URL for customer to complete payment (if required)
- Processing Time: Estimated processing duration
Payment Details
- Method Used: Confirmed payment method
- Amount: Transaction amount and currency
- Fees: Processing fees (if applicable)
- Exchange Rate: Currency conversion rate (if applicable)
Example Request
Example Response
Response Status Codes
Code | Description |
---|---|
200 | OK - Payment handling initiated successfully |
400 | Bad Request - Invalid payment method or request |
404 | Not Found - Payment request not found |
422 | Unprocessable Content - Payment method not supported for this request |
500 | Internal Server Error - Processing error occurred |
Error Response Examples
Invalid Payment Method
Payment Request Not Found
Unprocessable Payment Method
Payment Method Specific Handling
Credit Card Processing
- Initiates 3D Secure authentication if required
- Returns redirect URL for card verification
- Processes payment immediately for non-3DS cards
Digital Wallet Processing
- Validates wallet availability on customer device
- Initiates biometric authentication flow
- Returns wallet-specific payment session
UPI Processing
- Validates UPI ID format and availability
- Generates UPI payment link
- Supports QR code generation for mobile apps
Implementation Examples
JavaScript/Node.js
Payment Method Selection
Integration Patterns
Progressive Enhancement
- Start with Basic: Begin with credit card as fallback
- Detect Capabilities: Check for wallet/UPI support
- Offer Options: Present available payment methods
- Handle Gracefully: Fall back if preferred method fails
Mobile Optimization
- Wallet Priority: Prioritize digital wallets on mobile
- UPI for India: Offer UPI as primary option in Indian market
- Touch/Face ID: Leverage biometric authentication
- App Deep Links: Support payment app integration
Best Practices
Payment Method Selection
- Device Detection: Choose methods based on customer device
- Geographic Optimization: Offer region-appropriate methods
- Fallback Strategy: Always provide alternative payment options
- User Preference: Remember customer’s preferred methods
Error Handling
- Graceful Degradation: Fall back to alternative methods
- Clear Messaging: Provide helpful error messages
- Retry Logic: Implement appropriate retry mechanisms
- Support Integration: Link to customer support for complex issues
Security
- Method Validation: Verify payment method availability before processing
- Timeout Handling: Implement appropriate timeouts for each method
- Fraud Detection: Monitor for suspicious payment method patterns
- Compliance: Ensure compliance with payment method regulations
Related Endpoints
- Get Payment Request: Retrieve payment request details
- Payment Status Check: Check payment status
- Release Payment Request: Release payment request
- Create Payment Request: Create new payment requests
Path Parameters
Available options:
0
, 1
, 2
, 3
, 4
, 5
, 6
, 7
, 8
, 9
, 10
, 11
, 13
, 14
, 15
, 16
, 17
, 18
, 19
, 20
Response
OK