Skip to content

Event Details

payment.paid

Payment confirmed on-chain. Funds have been transferred directly to the merchant wallet. This is the terminal success state.

json
{
  "paymentId": "0xabc123...",
  "orderId": "order-001",
  "status": "PAID",
  "txHash": "0xdef789...",
  "amount": "10500000000000000000",
  "tokenSymbol": "SUT",
  "paidAt": "2024-01-26T12:35:42.000Z"
}

payment.invalid

Payment detected on-chain but validation failed. The on-chain transaction did not match the expected payment parameters (amount, token, or recipient mismatch).

json
{
  "paymentId": "0xabc123...",
  "orderId": "order-001",
  "status": "INVALID",
  "txHash": "0xdef789...",
  "amount": "10500000000000000000",
  "tokenSymbol": "SUT",
  "paidAt": "2024-01-26T12:35:42.000Z"
}

Payload Fields

FieldTypeDescription
paymentIdstringUnique payment identifier (bytes32 hash)
orderIdstringMerchant order ID (null if not provided)
statusstringPayment status at the time of the event
txHashstringOn-chain transaction hash
amountstringAmount in wei (string for precision)
tokenSymbolstringToken symbol (e.g., USDC, SUT)
paidAtstringISO-8601 timestamp of the on-chain confirmation

Event Handler Example

typescript
async function handleWebhook(payload: any) {
  const { status, orderId, paymentId } = payload;

  switch (status) {
    case 'PAID':
      await completeOrder(orderId);
      break;
    case 'INVALID':
      await flagOrderForReview(orderId, paymentId);
      break;
  }
}

Next Steps

Non-custodial Web3 payment infrastructure for ERC-20 checkout, sponsored gas, and wallet-to-wallet settlement.