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

Order Collect Out Webhook

PIK internally sweeps funds from a per-link order address into the merchant master address. This is an automated, internal operation triggered by PIK's collection task — the merchant does not initiate it manually.
Read webhook-overview.md first for signature verification, retry policy, and the state machine common to all events.

When it fires#

After a CUSTOMER_PAYMENT has been received on an order address, PIK schedules a collection task to move those funds (minus gas) to the merchant's master address. When that on-chain sweep is detected, this webhook fires.
Trigger conditionNotes
fromAddress ∈ PIK order poolThe order address being swept
toAddress ∈ PIK master addressesThe destination master address
Matching collection-task record existsIdentifies this as an authorized sweep

Event identifiers#

FieldValue
eventTypeORDER_COLLECT_OUT
businessRefTypeCOLLECT
directionIN
⚠️ Direction semantics. The event name says OUT (from the order address perspective — funds leaving that address), but direction = IN because PIK reports direction from the master account perspective (funds entering master). When reconciling balance, treat this as a positive movement on the master account.

State machine#

  PENDING ──── on-chain confirmed ────► CONFIRMED  (master balance increased)
     │
     └──────── reverted ─────────────► FAILED
StatusWhenSide effects
PENDINGSweep transaction first detected on-chainCollection task moves to SUCCESS server-side, but balance reconciliation not finalized
CONFIRMEDSufficient confirmationsMaster available balance is increased by the swept amount; funds are now withdrawable
FAILEDSweep revertedCollection task will be retried by the system

Payload examples#

status = PENDING#

{
  "event": "transaction.created",
  "timestamp": 1738803600000,
  "data": {
    "fundEventCode": "FE20260206130000004",
    "paymentLinkName": null,
    "businessRefType": "COLLECT",
    "chain": "Ethereum",
    "tokenSymbol": "USDC",
    "tokenAddress": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
    "txHash": "0xcccc111122223333cccc111122223333cccc111122223333cccc111122223333",
    "fromAddress": "0xfedcba0987654321fedcba0987654321fedcba09",
    "toAddress": "0xMasterAddressAAAAMasterAddressAAAAMasterAA",
    "amount": 98.50,
    "direction": "IN",
    "eventType": "ORDER_COLLECT_OUT",
    "status": "PENDING",
    "createTimeUtc": "2026-02-06 13:00:00"
  }
}

status = CONFIRMED#

{
  "event": "transaction.created",
  "timestamp": 1738803780000,
  "data": {
    "fundEventCode": "FE20260206130000004",
    "paymentLinkName": null,
    "businessRefType": "COLLECT",
    "chain": "Ethereum",
    "tokenSymbol": "USDC",
    "tokenAddress": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
    "txHash": "0xcccc111122223333cccc111122223333cccc111122223333cccc111122223333",
    "fromAddress": "0xfedcba0987654321fedcba0987654321fedcba09",
    "toAddress": "0xMasterAddressAAAAMasterAddressAAAAMasterAA",
    "amount": 98.50,
    "direction": "IN",
    "eventType": "ORDER_COLLECT_OUT",
    "status": "CONFIRMED",
    "createTimeUtc": "2026-02-06 13:00:00"
  }
}

status = FAILED#

{
  "event": "transaction.created",
  "timestamp": 1738803840000,
  "data": {
    "fundEventCode": "FE20260206130000004",
    "paymentLinkName": null,
    "businessRefType": "COLLECT",
    "chain": "Ethereum",
    "tokenSymbol": "USDC",
    "tokenAddress": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
    "txHash": "0xcccc111122223333cccc111122223333cccc111122223333cccc111122223333",
    "fromAddress": "0xfedcba0987654321fedcba0987654321fedcba09",
    "toAddress": "0xMasterAddressAAAAMasterAddressAAAAMasterAA",
    "amount": 98.50,
    "direction": "IN",
    "eventType": "ORDER_COLLECT_OUT",
    "status": "FAILED",
    "createTimeUtc": "2026-02-06 13:00:00"
  }
}

Field notes specific to this event#

FieldNotes
paymentLinkNamenull — the sweep is an internal operation, not tied to a single payment link in the payload
fromAddressOrder address being swept
toAddressMaster address
amountThe received amount on master (after gas), not necessarily equal to the original customer payment

Recommended handler logic#

For most merchants, ORDER_COLLECT_OUT is an internal accounting event and may not need user-facing handling — the corresponding CUSTOMER_PAYMENT is what triggers order fulfilment.
If you do track it:
1. Verify signature.
2. Switch on status:
     PENDING   → optional: log that a sweep is in progress.
     CONFIRMED → reconcile: order-address funds are now in master.
     FAILED    → flag for ops investigation; system will retry automatically.
3. Respond 200.

Related events#

This event is downstream of a CUSTOMER_PAYMENT. The original fundEventCode of the payment is not the same as this sweep's fundEventCode — they are separate fund events tied by business logic, not by payload.
Funds are only available for WITHDRAW_OUT after this event reaches CONFIRMED.
Modified at 2026-05-25 08:34:21
Previous
Overview
Next
Customer Payment Webhook
Built with