DuckyPayDocs

Payment modes

Every charge picks a rail: the buyer connects a wallet, sends a plain transfer to a per-invoice address, or gets to choose between the two at checkout.

setting the mode
await duckypay.charges.create({
  chainId: 137,
  fiat: { currency: 'USD', amount: '25' },
  paymentMode: 'both',   // 'wallet' | 'transfer' | 'both' (default)
});

At a glance#

wallettransferboth
Buyer experienceConnect wallet, approve, paySend exact amount to an address (QR)Buyer picks either at checkout
Works from an exchange withdrawalNoYesYes
Who pays network gasThe buyerDuckyPay’s relayer, reimbursed from your share (~0.015 USDT)Depends on the rail used
SettlementAtomic — one transaction, instantDeposit first, then an on-chain settle splitWhichever rail pays first wins

Wallet mode#

The checkout asks the buyer to connect a wallet (WalletConnect or browser wallet) and submit one transaction to the PaymentRouter contract. The router verifies DuckyPay’s EIP-712 signature on the charge, then moves payer → merchant and payer → treasury atomically. The instant the transaction confirms, your money is in your wallet.

  • The buyer pays their own gas; nothing is deducted from your amount.
  • The signed intent has a deadline — the contract refuses payment after the charge expires, so a stale checkout can never pay.

Transfer mode#

Each charge gets its own deposit address (deterministically derived — no key exists for it). The buyer simply sends the exact token amount there, from any wallet or a centralized-exchange withdrawal. DuckyPay watches the address, then triggers the on-chain split that forwards your share to your payout wallet.

  • Because the deposit address holds tokens but no gas, DuckyPay’s relayer submits the settle transaction and is reimbursed the actual network cost (about 0.015 USDT) out of the merchant share. This is cost pass-through, not a platform fee — it is capped at 1% on-chain. Details in Pricing & fees.
  • Settlement is permissionless: anyone can call settle() themselves and pay their own gas instead. Funds can never be trapped behind DuckyPay.
  • Underpaid deposits stay claimable: when a buyer sends too little, you can top it up or settle the partial amount on demand from the dashboard.

Both mode#

One invoice arms both rails; the checkout lets the buyer choose. Crypto-native buyers connect a wallet; buyers holding funds on an exchange use the transfer address. Whichever rail pays first resolves the invoice, and the other is disarmed automatically. This is the default when you omit paymentMode (on chains without the transfer rail, an omitted mode falls back to wallet).

Choosing a mode#

  • Selling to crypto-native users? wallet zero deductions and instant atomic settlement.
  • Buyers withdraw from exchanges? transfer no wallet or dapp knowledge needed; a plain send completes the payment.
  • Mixed or unknown audience? bothlet the buyer decide at checkout.