Quickstart
Here you can find a simplified process to integrate AppKit Pay:Code Example
AppKit Pay Example
Check the React example
Install the library
Projects currently using Reown AppKit, or planning to use it to build custom payment flows with self-custodial wallets, should use AppKit Pay for a streamlined integration and significantly improved user experience out of the box. AppKit Pay can be found in
@reown/appkit-pay npm package.pay - Full Payment Flow
This function handles the complete payment flow — it opens the payment UI and waits for the result (success, failure, cancel, timeout).
pay. This function receives three values: recipient, amount, and paymentAsset.
openPay - Open Payment UI Only
This function opens or triggers the payment UI modal but doesn’t return the result of the payment. Use the hook to handle the payment result.
Supported Networks and Assets
AppKit Pay with Self-Custodial Wallets supports a wide range of networks and assets. For a complete list, please refer to the Networks and Assets Supported section.Assets Configuration
For the moment, AppKit Pay has pre-configured these assets:- baseETH, baseSepoliaETH, and baseUSDC
- ethereumUSDC, optimismUSDC, arbitrumUSDC, polygonUSDC and solanaUSDC
- ethereumUSDT, optimismUSDT, arbitrumUSDT, polygonUSDT and solanaUSDT
Prerequisites
Enable Payments Feature in Dashboard
The “Payments” feature must be enabled in the Reown Dashboard before you can use AppKit Pay, even for local testing.- Go to your project in the Reown Dashboard
- Navigate to the Payments section
- Enable the Payments feature for your projectId
Test locally
In order to test locally use localhost and port 3000. This is the only port available for local testing. Add the following to your package.json file in order to run the development server on port 3000:Hooks
All the payment hooks must be imported from@reown/appkit-pay/react. For example:
usePay
Handles the payment flow including opening the modal and tracking payment status.usePay(options?: { onSuccess?: (data: PaymentResult) => void, onError?: (error: AppKitPayErrorMessage) => void }): UsePayReturn
options: Callbacks for success and error handling.returns:{ open, isPending, isSuccess, data, error }