Documentation Index Fetch the complete documentation index at: https://docs.waypay.live/llms.txt
Use this file to discover all available pages before exploring further.
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
Request Body
Withdrawal amount (must be greater than 10)
Payment currency - exactly 3 characters (e.g., “PKR”, “USD”)
Withdrawal description (1-200 alphanumeric characters and spaces only) Pattern: ^[A-Za-z0-9 ]{1,200}$
Payment intent type (e.g., “withdrawal”)
Whether to automatically process the payout (default: false)
Optional JSON string containing additional metadata for the transaction
Webhook URL on your server to receive real-time payout status updates This 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.
Maximum length: 2048 charactersRequired: HTTPS URL that can accept POST requestsExample (Dynamic): https://yoursite.com/api/webhooks/withdrawal?payout_id=12345Example (Static): Configure https://yoursite.com/api/webhooks/payout in Merchant Portal and omit this parameterBest Practice: Use the Merchant Portal for static webhook URLs. Use this parameter only when you need dynamic, per-transaction webhook URLs.
See the Initiate Checkout documentation for complete webhook payload structure and implementation examples.
Customer information with bank account details Customer email address (must be valid email format)
Customer CNIC number - must be exactly 13 digits Pattern: ^\d{13}$Example: 3520108345678
Customer’s bank account number or IBAN (10-24 characters) Example: PK36SCBL0000001123456702
Standard bank code for IBFT withdrawals (2-20 characters) This code identifies the target bank for processing the withdrawal. Use the standardized bank codes listed in the Bank Codes Reference section below. Examples:
HBL - Habib Bank Limited
UBL - United Bank Limited
MCB - MCB Bank Limited
JAZZCASH - JazzCash
EASYPAISA - Easypaisa
See the complete list of valid bank codes below. Name of the customer’s bank (optional, for display purposes only) This field is informational only. The bankCode is used for actual processing. Examples:
Habib Bank Limited
United Bank Limited
Standard Chartered Bank
JazzCash
Easypaisa
Account holder name as per bank account (2-100 characters)
Order information Order reference (alphanumeric characters) Pattern: ^[A-Za-z0-9]+$
Discount amount or percentage
Request signature for security verification A 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: a1b2c3d4e5f6789012345678abcdef12Never expose your secret key in client-side code. Always generate signatures on your server.
Learn 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
Your merchant reference for this transaction
Whether this is a live or test transaction
Total amount required (withdrawal amount + fee)
Your current available wallet balance
Information about the payout processing Provider from which transaction is completed
Transaction reference number
Whether the payout was successful
Error details if payout failed
Estimated time when payout will be completed
Customer’s account number
curl --request POST \
--url https://gateway.dev.waypay.live/Gateway/v1/Payment/withdraw \
--header 'SWICH-API-Key: pk_test_xxxxxxxx' \
--header 'Content-Type: application/json' \
--data '{
"amount": 5000,
"currency": "PKR",
"description": "Freelancer Payment",
"intentType": "withdrawal",
"autoProcessPayout": true,
"callbackUrl": "https://yoursite.com/withdrawal/callback",
"customerRef": {
"name": "Ahmed Ali",
"email": "ahmed@example.com",
"cnic": "3520108345678",
"phone": "03123456789",
"bankAccountNumber": "PK36SCBL0000001123456702",
"bankCode": "SCB",
"bankName": "Standard Chartered Bank",
"accountTitle": "Ahmed Ali"
},
"orderRef": {
"orderRef": "WD123456"
},
"signature": "a1b2c3d4e5f6789012345678abcdef12"
}'
200 Success
400 Bad Request
401 Unauthorized
422 Unprocessable Content
{
"paymentIntentId" : "880e8400-e29b-41d4-a716-446655440000" ,
"amount" : 5000 ,
"currency" : "PKR" ,
"merchantReference" : "WD123456" ,
"isLive" : false ,
"fee" : 150.00 ,
"totalRequired" : 5150.00 ,
"availableBalance" : 10000.00 ,
"payoutInfo" : {
"status" : "Processing" ,
"provider" : "JazzCash" ,
"transactionReference" : "WD20251213123456" ,
"message" : "Payout initiated successfully" ,
"isSuccess" : true ,
"errorDetails" : null ,
"estimatedCompletionTime" : "2025-12-14T10:00:00Z" ,
"customerBankName" : "Standard Chartered Bank" ,
"customerAccountNumber" : "PK36SCBL0000001123456702"
}
}
Validation Rules
Must be exactly 13 digits when provided
Pattern: ^\d{13}$
Example: 3520108345678
Phone Number (Optional)
No specific format required
Recommended format for Pakistani numbers: 03XXXXXXXXX or +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 bankCode field 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 amount
currency - Payment currency (3 characters)
description - Transaction description
customerRef - Customer information object
customerRef.bankAccountNumber - Bank account or IBAN
customerRef.bankCode - Standard bank code for IBFT processing
customerRef.accountTitle - Account holder name
orderRef - Order information object
orderRef.orderRef - Unique order reference
signature - Request signature for security verification
Optional Fields
intentType - Payment intent type
autoProcessPayout - Auto-process flag (default: false)
metadataJson - Additional metadata
callbackUrl - Dynamic callback URL for post-payout redirect
customerRef.name - Customer full name
customerRef.email - Customer email
customerRef.cnic - Customer CNIC
customerRef.phone - Customer phone
customerRef.bankName - Bank name (informational only)
orderRef.discount - Discount information
orderRef.tax - Tax information
Auto Process Payout
When autoProcessPayout 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
When set to 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 bankCode from the Bank Codes Reference section
Ensure sufficient balance in your merchant wallet (including transaction fees)
Use autoProcessPayout: false for high-value transactions that need review
Monitor the payoutInfo.status to track withdrawal completion
Store the paymentIntentId for 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 metadataJson to store additional transaction context
The bankName field is optional and informational only - use bankCode for 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
The estimatedCompletionTime field provides the expected completion timestamp.
Common Error Scenarios
Error Cause Solution Invalid bank account Incorrect IBAN or account number format Verify account number format (10-24 characters) Invalid bank code Unsupported or incorrect bank code Use a valid bank code from the supported list Bank not found Bank code not recognized Check the Bank Codes Reference section for valid codes Account mismatch Account title doesn’t match bank records Verify account holder name Insufficient balance Not enough funds in merchant wallet Top up wallet or reduce withdrawal amount Validation error Missing required fields Ensure all required fields are provided including bankCode
Bank Codes Reference
Use these standardized bank codes in the bankCode field when creating withdrawal orders. The codes are case-insensitive.
Major Banks
Bank Code Bank Name Also Accepts HBLHabib Bank Limited HBL, Habib Bank UBLUnited Bank Limited UBL, United Bank MCBMCB Bank Limited MCB, MCB Bank ABLAllied Bank Limited ABL, Allied Bank, Allied ASKARIAskari Bank Limited Askari, Askari Bank MEEZANMeezan Bank Limited Meezan, Meezan Bank FAYSALFaysal Bank Limited Faysal, Faysal Bank ALFALAHBank Alfalah Limited Alfalah, Bank Alfalah ALHABIBBank Al Habib Limited AlHabib, Al Habib, Bank Al Habib JSBANKJS Bank Limited JS, JS Bank, JSBANK
Islamic Banks
Bank Code Bank Name Also Accepts BANKISLAMIBankIslami Pakistan Limited BankIslami, Bank Islami DIBDubai Islamic Bank Pakistan Limited DubaiIslamic, Dubai Islamic, Dubai Islamic Bank ALBARKAAl Baraka Bank (Pakistan) Limited Albarka, Al Baraka, ALBARAKA
Foreign Banks
Bank Code Bank Name Also Accepts CITICitibank N.A. Citi, Citibank SCBStandard Chartered Bank (Pakistan) Limited SCB, Standard Chartered, Standard Chartered Bank BOKBank of Korea BOK ICBCIndustrial and Commercial Bank of China Limited ICBC
Public Sector Banks
Bank Code Bank Name Also Accepts NBPNational Bank of Pakistan NBP, National Bank SINDHSindh Bank Limited SindhBank, Sindh Bank BOPThe Bank of Punjab PunjabBank, Bank of Punjab, BOP ZTBLZarai Taraqiati Bank Limited Zarai Taraqiati Bank, ZTBL
Digital & Wallet Banks
Bank Code Bank Name Also Accepts JAZZCASHJazzCash - Mobilink Bank JazzCash, Jazz Cash, Mobilink Bank EASYPAISAEasypaisa - Telenor Microfinance Bank EasyPaisa, Easypaisa, Telenor Microfinance SADAPAYSadaPay SADAPAY, Sada Pay NAYAPAYNayapay NAYAPAY, NayaPay, Naya Pay UPAISAUPaisa - U Microfinance Bank Limited UPaisa, U Paisa, U Microfinance Bank KEENUKeenu KEENU, Keenu Bank TAGTAG TAG FINJAFinja FINJA, Finja Lending BYKEABykea BYKEA
Microfinance Banks
Bank Code Bank Name Also Accepts NRSPNRSP Microfinance Bank Limited NRSP, NRSP Microfinance FMFBFirst Microfinance Bank Limited First Microfinance Bank, FMFB FINCAFINCA Microfinance Bank Limited FINCA, FINCA Microfinance FWBLFirst Women Bank Limited FWBL, First Women Bank APNAApna Microfinance Bank Limited Apna, Apna Microfinance BURJBurj Bank Limited Burj, Burj Bank MIBMobilink Microfinance Bank Limited MIB, Mobilink Microfinance ADVANSAdvans Pakistan Microfinance Bank Limited Advans, Advans Pakistan
Other Banks
Bank Code Bank Name Also Accepts SILKSilk Bank Limited Silk, Silk Bank SONERISoneri Bank Limited Soneri, Soneri Bank SUMMITSummit Bank Limited Summit, Summit Bank NIBNIB Bank Limited NIB, NIB Bank HMBHabib Metropolitan Bank Limited HabibMetro, Habib Metro, Habib Metropolitan Bank SAMBASamba Bank Limited Samba, Samba Bank WASEELAWaseela Microfinance Bank Limited Waseela, Waseela bank
Financial Services
Bank Code Bank Name Also Accepts CDNSCentral Directorate of National Savings CDNS, National Savings PAYMAXPayMax PayMax ALMEEZANAl Meezan Investment Management Limited Al Meezan, Al Meezan Investment HBLAMHBL Asset Management Limited HBL ASSET MANAGEMENT, HBL Asset Management NBPFMNBP Fund Management Limited NBP Fund Management MCBAHMCB-Arif Habib Savings and Investments Limited MCB-Arif Habib, MCB Arif Habib
Non-Bank Financial Institutions
Bank Code Bank Name Also Accepts ABHIAbhi Finance Services Limited ABHI SEEDCREEDSeedCreed Financial Services Limited SEEDCREED, SeedCreed, Seed Creed HUMRAHHumrah Financial Services Humrah, HUMRAH NUMBERSNumbers Private Limited Numbers, NUMBERS TEZPAYTezPay TezPAy, Tez Pay, TEZPAY EZWAGEEZ wage EZ wage, EZwage, EZWAGE
Special Codes
Bank Code Bank Name Also Accepts AFTIBFTAFT IBFT AFT IBFT, AFT
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: false for 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