Withdrawal
Create Withdrawal Order
Create a withdrawal order to send funds to a customer’s bank account
POST
Overview
This endpoint creates a withdrawal order that processes a payout from your merchant wallet to a customer’s bank account. Use this for disbursements, refunds, commission payments, or any scenario where you need to send money to customers.Path Parameters
string
required
API version (e.g., “1”)
Request Body
number
required
Withdrawal amount. Minimum withdrawal amount is 300 (applies to all providers, including JazzCash and Easypaisa).
string
required
Payment currency - exactly 3 characters (e.g., “PKR”, “USD”)
string
required
Withdrawal description (1-200 alphanumeric characters and spaces only)Pattern:
^[A-Za-z0-9 ]{1,200}$string
Payment intent type (e.g., “withdrawal”)
boolean
Whether to automatically process the payout (default: false)
string
Optional JSON string containing additional metadata for the transaction
string
Webhook URL on your server to receive real-time payout status updatesThis should be a publicly accessible HTTPS endpoint in your merchant system that can receive POST requests from Waypay. When a payout/withdrawal 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/withdrawal?payout_id=12345Example (Static): Configure https://yoursite.com/api/webhooks/payout in Merchant Portal and omit this parameterSee the Initiate Checkout documentation for complete webhook payload structure and implementation examples.object
required
Customer information with bank account details
object
required
Order information
string
required
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
uuid
Unique identifier for the payment intent
number
Withdrawal amount
string
Payment currency
string
Your merchant reference for this transaction
boolean
Whether this is a live or test transaction
number
Transaction fee amount
number
Total amount required (withdrawal amount + fee)
number
Your current available wallet balance
object
Information about the payout processing
Validation Rules
CNIC Format (Optional)
- Must be exactly 13 digits when provided
- Pattern:
^\d{13}$ - Example:
3520108345678
Phone Number (Optional)
- No specific format required
- Recommended format for Pakistani numbers:
03XXXXXXXXXor+923XXXXXXXXX
Bank Account Number (Required)
- Length: 10-24 characters
- Supports both IBAN and regular account numbers
- Example IBAN:
PK36SCBL0000001123456702
Bank Code (Required)
- Length: 2-20 characters
- Must be a valid standard bank code from the supported banks list
- Case-insensitive (will be automatically normalized)
- Examples:
HBL,UBL,MCB,JAZZCASH,EASYPAISA,SCB - See Bank Codes Reference for complete list
Bank Name (Optional)
- Length: 2-100 characters
- For informational/display purposes only
- The
bankCodefield is used for actual transaction processing - Examples: Habib Bank Limited, United Bank Limited, Standard Chartered Bank
Account Title (Required)
- Length: 2-100 characters
- Must match the bank account holder’s name
Currency (Required)
- Must be exactly 3 characters
- Examples:
PKR,USD,EUR
Description (Required)
- Length: 1-200 characters
- Pattern:
^[A-Za-z0-9 ]{1,200}$ - Only alphanumeric characters and spaces allowed
Required vs Optional Fields
Required Fields
amount- Withdrawal amountcurrency- Payment currency (3 characters)description- Transaction descriptioncustomerRef- Customer information objectcustomerRef.bankAccountNumber- Bank account or IBANcustomerRef.bankCode- Standard bank code for IBFT processingcustomerRef.accountTitle- Account holder nameorderRef- Order information objectorderRef.orderRef- Unique order referencesignature- Request signature for security verification
Optional Fields
intentType- Payment intent typeautoProcessPayout- Auto-process flag (default: false)metadataJson- Additional metadatacallbackUrl- Dynamic callback URL for post-payout redirectcustomerRef.name- Customer full namecustomerRef.email- Customer emailcustomerRef.cnic- Customer CNICcustomerRef.phone- Customer phonecustomerRef.bankName- Bank name (informational only)orderRef.discount- Discount informationorderRef.tax- Tax information
Auto Process Payout
WhenautoProcessPayout is set to true, the system will automatically initiate the bank transfer without requiring manual approval. This is useful for:
- Automated disbursement systems
- Real-time payouts
- High-volume withdrawal processing
false (default), the withdrawal will be created but require manual approval before processing.
Best Practices
- Always verify the customer’s bank account details before processing
- Use the correct standardized
bankCodefrom the Bank Codes Reference section - Ensure sufficient balance in your merchant wallet (including transaction fees)
- Use
autoProcessPayout: falsefor high-value transactions that need review - Monitor the
payoutInfo.statusto track withdrawal completion - Store the
paymentIntentIdfor future reference and reconciliation - Provide name, email and phone when available for better customer communication
- Include CNIC for compliance and verification purposes when available
- Verify account title matches the bank account holder’s name
- Use
metadataJsonto store additional transaction context - The
bankNamefield is optional and informational only - usebankCodefor processing
Processing Time
Withdrawal processing times vary by bank and amount:- Instant: Some banks support real-time transfers
- Same Day: Most local banks (2-4 hours)
- Next Day: For high-value transactions or certain banks
estimatedCompletionTime field provides the expected completion timestamp.
Common Error Scenarios
Bank Codes Reference
Use these standardized bank codes in thebankCode field when creating withdrawal orders. The codes are case-insensitive.
Major Banks
Islamic Banks
Foreign Banks
Public Sector Banks
Digital & Wallet Banks
Microfinance Banks
Other Banks
Financial Services
Non-Bank Financial Institutions
Special Codes
Important: The
bankCode field is required and must match one of the standard codes listed above. The system will validate the bank code before processing the withdrawal. Bank codes are case-insensitive, so you can use hbl, HBL, or Hbl.Security Considerations
- Never store sensitive bank account information in plain text
- Use HTTPS for all API communications
- Validate bank account details before processing withdrawals
- Implement rate limiting to prevent abuse
- Monitor for suspicious withdrawal patterns
- Keep API keys secure and rotate regularly
- Set up alerts for large withdrawal amounts
- Use
autoProcessPayout: falsefor manual review of high-value transactions
Testing
Use these test credentials in sandbox mode:- Name:
Test User - Email:
test@example.com(optional) - CNIC:
3520108345678(optional) - Phone:
03123456789(optional) - Bank Account:
PK36SCBL0000001123456702 - Bank Code:
SCB(required) - Bank Name:
Standard Chartered Bank(optional) - Account Title:
Test User
Next Steps
Check Transaction Status
Monitor withdrawal status by transaction reference
Setup Webhooks
Receive real-time notifications for withdrawal events
Handle Refunds
Process refunds if needed
View Settlement
Check settlement details