Skip to content

Hosted facilitator /settle returns 500 after successful BSC Permit2 settlement #82

Description

@vdp641

Environment

  • Facilitator: https://facilitator.bankofai.io
  • Authentication: anonymous mode, no API key
  • Network: BSC mainnet (eip155:56)
  • Scheme: exact
  • Transfer method: permit2
  • Token: BSC USDT (0x55d398326f99059fF775485246999027B3197955)
  • Amount: 0.001 USDT
  • SDK: @bankofai/x402-evm@1.0.1
  • Node.js: v22.22.0

Observed behavior

  1. POST /verify returned successfully with isValid: true.

  2. POST /settle returned HTTP 500:

    {
      "success": false,
      "errorReason": "internal_error"
    }
  3. Despite the HTTP error, the transaction was successfully executed on BSC:

    https://bscscan.com/tx/0xbcd72b8eabdb30df1efd1598fc12c6cfcf26f4ce58925f10a3351a5b707f5c8c

    • Block: 115645933
    • Timestamp: 2026-08-13T06:08:16Z
    • Facilitator sender: 0x672eD10501BA36dc157138BC96c7b30e9B706aa9
    • Settlement proxy: 0x402085c248eea27d92e8b30b2c58ed07f9e20001
    • Receiver credited: exactly 0.001 USDT
  4. Querying the settlement afterward returned 404:

    GET /payments/tx/0xbcd72b8eabdb30df1efd1598fc12c6cfcf26f4ce58925f10a3351a5b707f5c8c

    {
      "code": "not_found",
      "message": "Settlement not found"
    }

The payer balance decreased by exactly 0.001 USDT, the receiver balance increased by exactly 0.001 USDT, and the payer's Permit2 allowance was consumed back to zero. We did not retry settlement after detecting the successful on-chain transfer.

Expected behavior

After the successful on-chain transaction, /settle should return HTTP 200 with success: true and the transaction hash. The settlement should also be available through /payments/tx/{txHash}.

Impact

The buyer was charged successfully, but the resource server received an error. This can cause the paid resource to be withheld or the settlement to be classified as failed. A blind retry would also be unsafe behavior for an integrator when the first response does not expose the successful transaction.

Could you please inspect the hosted facilitator logs around the timestamp and transaction above? It appears broadcasting succeeded but response generation or payment-record persistence failed afterward. Please also advise the intended idempotent recovery/reconciliation procedure for this case.

For security, this report intentionally excludes the signed payment payload and PAYMENT-SIGNATURE. We can provide additional non-secret diagnostics if needed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions