Skip to main content
ConfidentialPayments is a payment link registry for HideMeToken (native confidential tokens). Merchants create links with a fixed amount; payers fulfill them by calling payLink(), which triggers transferPlaintext on the token — encrypting the transfer on-chain. Mainnet address: 0xA12c43CFCe337f0f8b831551Fbd273A61b0488d5
This contract works with HideMeToken only. For confidential payments with any ERC-20 (WETH, USDC, etc.), see ConfidentialPaymentRouterV2.
function createPaymentLink(
    address token,
    uint64 amount,
    string calldata memo,
    uint256 expiry
) external returns (bytes32 linkId)
Create a new payment link. The link ID is a keccak256 hash of the parameters and block timestamp.
token
address
required
A HideMeToken contract address.
amount
uint64
required
Fixed payment amount in raw token units (6 decimals). For example, 50_000_000 = 50 tokens.
memo
string
required
Human-readable description (e.g. "Invoice #42").
expiry
uint256
required
Unix timestamp after which the link cannot be paid. Pass 0 for no expiry.
Returns bytes32 linkId.
function payLink(bytes32 linkId) external
Fulfill a payment link. Calls token.transferPlaintext(merchant, amount) on the payer’s behalf — the amount is encrypted on-chain inside the EVM.
The payer must hold sufficient HideMeToken balance. Due to FHE’s silent-failure pattern, an insufficient balance results in a 0-amount transfer, but the link is still marked as paid.
function cancelLink(bytes32 linkId) external
Cancel an unpaid payment link. Only the merchant (link creator) can cancel. Paid links cannot be cancelled.
function getLink(bytes32 linkId) external view returns (
    address token,
    address merchant,
    uint64 amount,
    string memory memo,
    uint256 expiry,
    bool paid,
    bool cancelled,
    address payer,
    uint256 paidAt
)
function getMerchantLinks(address merchant) external view returns (bytes32[] memory)
Returns all link IDs created by the given merchant address.
token
address
The HideMeToken contract address.
merchant
address
Address that created the link and receives payment.
amount
uint64
Fixed amount in token units (6 decimals).
memo
string
Description set at creation time.
expiry
uint256
Expiry timestamp. 0 = no expiry.
paid
bool
Whether the link has been fulfilled.
cancelled
bool
Whether the merchant cancelled the link.
payer
address
Address that paid (address(0) if unpaid).
paidAt
uint256
Block timestamp of payment (0 if unpaid).

Events

EventParameters
LinkCreatedlinkId, merchant, token
LinkPaidlinkId, payer, paidAt
LinkCancelledEventlinkId

Custom errors

ErrorWhen thrown
LinkNotFoundlinkId does not exist
LinkAlreadyPaidLink has already been paid
LinkExpiredCurrent time exceeds expiry
LinkNotExpired(reserved)
NotMerchantCaller is not the link creator
LinkCancelledLink was cancelled

Payment Links

How to use payment links from the frontend.

PaymentRouterV2

For confidential payments with any ERC-20.

Build docs developers (and LLMs) love