Skip to main content
POST
/
Gateway
/
v
{version}
/
Payment
/
withdraw
curl --request POST \
  --url https://waypay-merchant-api.icydesert-41d42f7e.uaenorth.azurecontainerapps.io/Gateway/v1/Payment/withdraw \
  --header 'SWICH-API-Key: pk_test_xxxxxxxx' \
  --header 'Content-Type: application/json' \
  --data '{
    "amount": 5000,
    "description": "Freelancer Payment",
    "cnic": "3520108345678",
    "customerAccountNumber": "PK36SCBL0000001123456702",
    "customerBankName": "Standard Chartered Bank",
    "customerFullName": "Ahmed Ali",
    "customerEmail": "ahmed@example.com",
    "billReference": "INV-2025-001",
    "autoProcessPayout": true,
    "currency": "PKR",
    "intentType": "withdrawal",
    "customerRef": {
      "name": "Ahmed Ali",
      "email": "ahmed@example.com",
      "cnic": "3520108345678",
      "phone": "03123456789"
    },
    "orderRef": {
      "orderRef": "WD123456"
    }
  }'
{
  "paymentIntentId": "880e8400-e29b-41d4-a716-446655440000",
  "amount": 5000,
  "currency": "PKR",
  "merchantReference": "WD123456",
  "payoutInfo": {
    "status": "Processing",
    "transactionReference": "WD20251213123456",
    "message": "Payout initiated successfully",
    "isSuccess": true,
    "errorDetails": null,
    "estimatedCompletionTime": "2025-12-14T10:00:00Z",
    "customerBankName": "Standard Chartered Bank",
    "customerAccountNumber": "PK36SCBL0000001123456702"
  }
}

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

version
string
required
API version (e.g., “1”)

Request Body

amount
number
required
Withdrawal amount (must be greater than 0.01)
description
string
required
Withdrawal description (1-200 alphanumeric characters and spaces only)
cnic
string
Customer’s CNIC number
customerAccountNumber
string
Customer’s bank account number or IBAN
customerBankName
string
Name of the customer’s bank
customerFullName
string
Customer’s full name as per bank account
customerEmail
string
Customer’s email address
billReference
string
Optional bill or invoice reference
autoProcessPayout
boolean
Whether to automatically process the payout (default: false)
currency
string
Payment currency (e.g., “PKR”, “USD”)
successUrl
string
URL to redirect after successful withdrawal
cancelUrl
string
URL to redirect after cancelled withdrawal
intentType
string
Payment intent type (e.g., “withdrawal”)
customerRef
object
Customer information
orderRef
object
Order information

Response

paymentIntentId
uuid
Unique identifier for the payment intent
amount
number
Withdrawal amount
currency
string
Payment currency
merchantReference
string
Your merchant reference for this transaction
payoutInfo
object
Information about the payout processing
curl --request POST \
  --url https://waypay-merchant-api.icydesert-41d42f7e.uaenorth.azurecontainerapps.io/Gateway/v1/Payment/withdraw \
  --header 'SWICH-API-Key: pk_test_xxxxxxxx' \
  --header 'Content-Type: application/json' \
  --data '{
    "amount": 5000,
    "description": "Freelancer Payment",
    "cnic": "3520108345678",
    "customerAccountNumber": "PK36SCBL0000001123456702",
    "customerBankName": "Standard Chartered Bank",
    "customerFullName": "Ahmed Ali",
    "customerEmail": "ahmed@example.com",
    "billReference": "INV-2025-001",
    "autoProcessPayout": true,
    "currency": "PKR",
    "intentType": "withdrawal",
    "customerRef": {
      "name": "Ahmed Ali",
      "email": "ahmed@example.com",
      "cnic": "3520108345678",
      "phone": "03123456789"
    },
    "orderRef": {
      "orderRef": "WD123456"
    }
  }'
{
  "paymentIntentId": "880e8400-e29b-41d4-a716-446655440000",
  "amount": 5000,
  "currency": "PKR",
  "merchantReference": "WD123456",
  "payoutInfo": {
    "status": "Processing",
    "transactionReference": "WD20251213123456",
    "message": "Payout initiated successfully",
    "isSuccess": true,
    "errorDetails": null,
    "estimatedCompletionTime": "2025-12-14T10:00:00Z",
    "customerBankName": "Standard Chartered Bank",
    "customerAccountNumber": "PK36SCBL0000001123456702"
  }
}

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
  • 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
  • Validate CNIC and account holder name match for compliance

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.