Learn how to integrate Phoenix using vanilla HTML and JavaScript
Obtaining Access Token
walletAddress
: The Ethereum wallet address where USDC will be sentamount
: The amount in USD to convert to USDCaccessToken
: The access token from your backendonClose
: Function to handle when the user closes the payment modalhandlePaymentMessage
: Function to process payment response messagesonDone
: Function to handle when the payment process is complete (new)amount
: The USD amounttoken
: The token received (e.g., “USDC”)chain
: The blockchain (e.g., “Base”)walletAddress
: The receiving wallet addresssendAmount
: The amount of tokens senttransactionHash
: The blockchain transaction hashbasescanLink
: Link to view the transaction on Basescanorder_id
: Unique identifier for the orderdata
: Object containing additional order details:
created_at
: Timestamp of order creationbuyer_address
: The buyer’s wallet addressseller_address
: The seller’s wallet addresssend_amount
: The amount to be sentreceive_amount
: The amount to be receiveduniqueness_amount
: The amount of cents added to the order for uniquenessreceiving_chain_id
: The chain ID where the payment will be receivedzelle_address
: The Zelle address for paymentView Complete Example