Deposit
Create Deposit Order
Create a deposit order to collect payment from customer’s mobile wallet
POST
Overview
This endpoint creates a deposit order that initiates a mobile wallet charge from your customer. Use this for collecting payments directly from mobile wallets like JazzCash, Easypaisa.Path Parameters
API version (e.g., “1”)
Request Body
Customer’s mobile wallet number
Deposit amount (must be greater than 10)
Mobile wallet provider code:
- 1: JazzCash
- 2: Easypaisa
Payment method (same as walletProvider):
- 1: JazzCash
- 2: Easypaisa
Payment currency (e.g., “PKR”)
Payment description (1-200 alphanumeric characters and spaces only)Pattern:
^[A-Za-z0-9 ]{1,200}$Webhook URL on your server to receive real-time transaction status updatesThis should be a publicly accessible HTTPS endpoint in your merchant system that can receive POST requests from Waypay. When a transaction status changes, Waypay will send a webhook notification to this URL with the transaction details.When to use this parameter:
- Use this parameter only if you need a dynamic webhook URL that varies per transaction (e.g., session-specific, order-specific URLs)
- If your webhook URL is static (same for all transactions), configure it in your Merchant Portal instead. The system will automatically use the portal-configured URL when this parameter is not provided.
https://yoursite.com/api/webhooks/deposit?order_id=12345Example (Static): Configure https://yoursite.com/api/webhooks/payment in Merchant Portal and omit this parameterSee the Initiate Checkout documentation for complete webhook payload structure and implementation examples.Payment intent type (e.g., “deposit”)
Customer information (optional object, all fields within are also optional)
Order information
Request signature for security verificationA cryptographic signature generated using MD5 hash algorithm to ensure the integrity and authenticity of the request. The signature is calculated using all request parameters (excluding the signature field itself) combined with your merchant secret key.Format: 32-character lowercase hexadecimal stringExample:
a1b2c3d4e5f6789012345678abcdef12Learn how to generate signatures: See the complete Signature Generation Guide for step-by-step instructions and implementation examples in C#, Node.js, Python, PHP, and Java.Response
Unique identifier for the payment intent
Deposit amount
Payment currency
Your merchant reference for this transaction
Information about the wallet charge attempt
Validation Rules
CNIC Format
- Must be exactly 13 digits
- Pattern:
^\d{13}$ - Example:
3520108345678
Order Reference
- Alphanumeric characters only
- Pattern:
^[A-Za-z0-9]+$ - Example:
ORD123456
Description
- Length: 1-200 characters
- Pattern:
^[A-Za-z0-9 ]{1,200}$ - Only alphanumeric characters and spaces allowed
Wallet Provider Codes
| Provider | Code | Status | Description |
|---|---|---|---|
| JazzCash | 1 | Active | Pakistan’s leading mobile wallet service |
| Easypaisa | 2 | Active | Popular mobile wallet and financial service |
The
paymentMethod and walletProvider fields accept the same values. You can use either field to specify the payment method.Payment Flow
- Create Deposit Order - Call this endpoint with customer details
- Customer Receives OTP - Mobile wallet provider sends OTP to customer’s phone
- Customer Verification - Customer enters OTP in their wallet app to approve
- Webhook Notification - You receive webhook when payment is confirmed
- Transaction Complete - Funds are added to your merchant wallet
In test mode, use OTP
123456 to complete wallet verification for testing purposes.Best Practices
- Validate Before Submission: Always validate mobile number and CNIC format before making the request
- Handle OTP Flow: Implement proper UI/UX for customers to complete OTP verification
- Monitor Status: Poll the transaction status or use webhooks to get real-time updates
- Error Handling: Implement retry logic for temporary failures
- Store Payment Intent ID: Keep the
paymentIntentIdfor reconciliation and support - Test Mode: Use test credentials (
03123456789) in sandbox environment - Production Mode: Use real customer data when processing live transactions
Common Error Scenarios
| Error | Cause | Solution |
|---|---|---|
| Wallet not available | Customer’s wallet account inactive | Ask customer to verify wallet account |
| Insufficient balance | Customer wallet has insufficient funds | Customer needs to top up wallet |
| Invalid mobile number | Number not registered with wallet | Verify mobile number with customer |
| OTP timeout | Customer didn’t complete verification | Retry the deposit request |
Security Considerations
- Never store customer CNIC or sensitive information in plain text
- Use HTTPS for all API communications
- Validate customer identity before processing deposits
- Implement rate limiting to prevent abuse
- Monitor for suspicious transaction patterns
- Keep API keys secure and rotate regularly
Testing
Use these test credentials in sandbox mode:- Mobile Number:
03123456789 - CNIC:
3520108345678 - OTP:
123456 - Wallet Provider:
1(JazzCash) or2(Easypaisa)
Next Steps
Check Transaction Status
Monitor deposit status by transaction reference
Setup Webhooks
Receive real-time notifications for deposit events
Handle Refunds
Process refunds for completed deposits
Mobile Wallet Charging
Direct wallet charging with tokens