1. Payment Links
PIK
  • Start
    • Getting Started
  • Authentication
    • Authentication Token
      POST
  • Global Account
    • Contacts
      • Create Contact
      • List Contacts
      • Get Contact
      • Count Contacts
    • Virtual Accounts
      • Create Virtual Account
      • List Virtual Accounts
      • Get Virtual Account
    • Transactions
      • List Transactions
      • Get Transaction
    • Account Balance
      • List Account Balances
      • Get Balance by Currency
    • Payout
      • Create Payout
    • Webhooks
      • Unified Webhook Entry
      • Virtual Account Webhook
      • Deposit Webhook
      • Payout Status Webhook
  • Payment Links
    • Payment Links
      • Create Payment Link
      • Update Payment Link
      • Get Payment Link Detail
      • Get Payment Link List
    • Transactions
      • Get Transaction List
  • Webhook
    • Global Account
      • Deposit Webhook
      • Payout Webhook
      • Virtual Account Webhook
    • Payment Links
      • Overview
      • Order Collect Out Webhook
      • Customer Payment Webhook
      • Customer Refund Webhook
      • Master Recharge Webhook
      • Web3 Direct Payment Webhook
      • Withdraw Out Webhook
  1. Payment Links

Withdraw Out Webhook

The merchant initiates a withdrawal: tokens move from the master address to an external destination address chosen by the merchant.
Read webhook-overview.md first for signature verification, retry policy, and the state machine common to all events.

When it fires#

PIK detects an outbound on-chain transfer from a master address. Each merchant-initiated withdrawal request produces a fund event tied to a CustomerWithdrawal record.
Trigger conditionNotes
fromAddress ∈ PIK master addressesWithdrawal source
Matching CustomerWithdrawal record existsIdentifies the withdrawal request

Event identifiers#

FieldValue
eventTypeWITHDRAW_OUT
businessRefTypeWITHDRAW
directionOUT

State machine#

  PENDING ──── on-chain confirmed ────► CONFIRMED  (withdrawal complete)
     │
     └──────── reverted / rejected ──► FAILED
StatusWhenSide effects
PENDINGWithdrawal transaction submitted to chain; balance has already been frozen/deducted when the request was placedThe internal CustomerWithdrawal record is in SUCCESS state (submitted), but on-chain confirmation pending
CONFIRMEDSufficient confirmationsWithdrawal is final — funds have left the master
FAILEDTransaction reverted or pre-flight validation rejected the withdrawalFrozen balance is returned to the merchant's available balance
Note: a withdrawal may also start in FAILED if the request was rejected synchronously (e.g., insufficient balance, validation error). In that case you receive a single FAILED webhook with no preceding PENDING.

Payload examples#

status = PENDING#

{
  "event": "transaction.created",
  "timestamp": 1738807200000,
  "data": {
    "fundEventCode": "FE20260206140000005",
    "paymentLinkName": null,
    "businessRefType": "WITHDRAW",
    "chain": "Ethereum",
    "tokenSymbol": "USDC",
    "tokenAddress": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
    "txHash": "0xdddd444455556666dddd444455556666dddd444455556666dddd444455556666",
    "fromAddress": "0xMasterAddressAAAAMasterAddressAAAAMasterAA",
    "toAddress": "0xExternalDest1234567890ExternalDest1234567",
    "amount": 500.00,
    "direction": "OUT",
    "eventType": "WITHDRAW_OUT",
    "status": "PENDING",
    "createTimeUtc": "2026-02-06 14:00:00"
  }
}

status = CONFIRMED#

{
  "event": "transaction.created",
  "timestamp": 1738807380000,
  "data": {
    "fundEventCode": "FE20260206140000005",
    "paymentLinkName": null,
    "businessRefType": "WITHDRAW",
    "chain": "Ethereum",
    "tokenSymbol": "USDC",
    "tokenAddress": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
    "txHash": "0xdddd444455556666dddd444455556666dddd444455556666dddd444455556666",
    "fromAddress": "0xMasterAddressAAAAMasterAddressAAAAMasterAA",
    "toAddress": "0xExternalDest1234567890ExternalDest1234567",
    "amount": 500.00,
    "direction": "OUT",
    "eventType": "WITHDRAW_OUT",
    "status": "CONFIRMED",
    "createTimeUtc": "2026-02-06 14:00:00"
  }
}

status = FAILED#

Note: when a withdrawal fails synchronously (rejected before chain submission), txHash may be absent or empty.
{
  "event": "transaction.created",
  "timestamp": 1738807440000,
  "data": {
    "fundEventCode": "FE20260206140000006",
    "paymentLinkName": null,
    "businessRefType": "WITHDRAW",
    "chain": "Ethereum",
    "tokenSymbol": "USDC",
    "tokenAddress": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
    "txHash": "",
    "fromAddress": "0xMasterAddressAAAAMasterAddressAAAAMasterAA",
    "toAddress": "0xExternalDest1234567890ExternalDest1234567",
    "amount": 500.00,
    "direction": "OUT",
    "eventType": "WITHDRAW_OUT",
    "status": "FAILED",
    "createTimeUtc": "2026-02-06 14:01:00"
  }
}

Field notes specific to this event#

FieldNotes
paymentLinkNamenull — withdrawals are not tied to payment links
fromAddressMerchant master address
toAddressThe external destination chosen by the merchant when initiating the withdrawal
amountThe net amount sent to the destination (post-gas-fee deduction)

Gas fee#

For each withdrawal you may also receive a separate fund event with businessRefType = "GAS FEE" representing the gas-fee deduction. That event has its own fundEventCode and is delivered through the same webhook channel.

Recommended handler logic#

1. Verify signature.
2. Look up local withdrawal record by fundEventCode.
3. Switch on status:
     PENDING   → mark "in flight". Show user "processing".
     CONFIRMED → mark "completed". Notify user.
     FAILED    → mark "failed". Frozen balance is auto-refunded by PIK;
                 reconcile your internal ledger.
4. Respond 200 within 5 seconds.

Related events#

Funds withdrawn here must have first arrived in the master via MASTER_RECHARGE, WEB3_DIRECT_PAYMENT, or ORDER_COLLECT_OUT.
Modified at 2026-05-25 08:37:26
Previous
Web3 Direct Payment Webhook
Built with