Payments
This document describes the payment-related features and operations in Spell.
A blockchain transfer refers to a transfer operation initiated from one address to another. The default token is the native cryptocurrency of the blockchain (e.g., BTC, ETH, BNB), and the transfer amount is specified by the initiator.
For non-native cryptocurrencies (e.g., USDT, USDC), taking Ethereum-compatible blockchains as an example, a transfer refers to a contract interaction initiated by an address with an ERC-20 contract (token contract) within a specific blockchain network. The interaction content defines the transaction amount and the recipient’s address. Due to the high complexity of this operation, users typically complete it using a wallet browser extension (e.g., MetaMask).
In Spell, since additional information beyond the default transfer details is required to match orders and transfers, we have encapsulated this complex functionality. After a merchant or individual creates an order, they can send the order payment link to the user they wish to collect payment. The user can then initiate payment through the payment page (spell.im/pay/[orderId]
). The payment page displays the order details (e.g., blockchain network, recipient address, token, amount). When the user clicks the pay button, we send a prepared payment contract request to their installed wallet extension. The extension will then pop up a payment interface, and after the user confirms the payment, the system will verify the payment result. The order status will change from “pending payment” to “pending confirmation.”