### Contract Payment Methods for TransferIntent Source: https://github.com/xer-on/commerce-onchain-payment-protocol/blob/master/README.md Details the various methods available for a frontend to select when paying a `TransferIntent`, depending on settlement token, input token, and payer's token movement allowance. These methods cover direct transfers, wrapped token handling, and Uniswap V3-based swaps. ```APIDOC transferNative: The merchant wants ETH and the payer wants to pay ETH transferToken: The merchant wants a token and the payer wants to pay with that token. Uses Permit2 for token movement. transferTokenPreApproved: Same as transferToken, except the Transfers contract is directly approved by the payer for the payment token wrapAndTransfer: The merchant wants WETH and the payer wants to pay ETH unwrapAndTransfer: The merchant wants ETH and the payer wants to pay WETH unwrapAndTransferPreApproved: Same as unwrapAndTransfer, except the Transfers contract is directly approved by the payer for WETH swapAndTransferUniswapV3Native: The merchant wants a token and the payer wants to pay ETH. The token must have sufficient liquidity with ETH on Uniswap V3. swapAndTransferUniswapV3Token: The merchant wants either ETH or a token and the payer wants to pay with a different token. The payment token must have sufficient liquidity with the settlement token on Uniswap V3. swapAndTransferUniswapV3TokenPreApproved: Same as swapAndTransferUniswapV3Token, except the Transfers contract is directly approved by the payer for the payment token ``` -------------------------------- ### APIDOC: TransferIntent Solidity Struct Definition Source: https://github.com/xer-on/commerce-onchain-payment-protocol/blob/master/README.md Defines the structure for a TransferIntent, a primitive used for individual payments within the Coinbase Commerce Onchain Payment Protocol. This struct specifies all necessary details for a payment, including merchant, payer, currency, amount, deadline, and operator information. It must be signed by the operator to prevent forgery and data modification. ```APIDOC TransferIntent (Solidity struct): - merchant's address: address - currency the merchant wishes to receive: address (token address) - amount of that currency the merchant wishes to receive: uint256 - deadline by which the payment must be made: uint256 (timestamp) - payer's address: address - chain the payer will pay on: uint256 (chain ID) - address any refund should be directed to: address - operator who is facilitating the payment: address - fee the operator should receive: uint256 - unique identifier for identifying the payment: bytes32 - signature from the operator: bytes - optional signature prefix from the operator: bytes ``` -------------------------------- ### Payment Transaction Results and Error Handling Source: https://github.com/xer-on/commerce-onchain-payment-protocol/blob/master/README.md Describes the `Transferred` event emitted upon successful payment, detailing its parameters, and outlines the general approach to error handling where specific error types are returned. ```APIDOC Transferred Event: Emitted by the contract upon successful payment with details about: - The operator address - The unique id of the TransferIntent - The merchant (recipient) address - The payer (sender) address - The input token that was spent by the payer - The amount of the input token spent by the payer Error Handling: In the case of errors, a specific error type is returned with details about what went wrong. ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.