Create a Self-Hosted Blockchain Payment Processor with x402 and 1Shot API
This workflow contains community nodes that are only compatible with the self-hosted version of n8n.
Self-Hosted x402 Facilitator
In the x402 payment protocol, a facilitator is a role which helps sellers settle stablecoin payments onchain without dealing with blockchain complexities. This workflow allows you to run your own fully-featured, specification-compliant facilitator in n8n. You might want to do this if you want to accept payments in tokens not supported by existing facilitators or as your own business!
Details
A facilitator supports three routes: /verify, /settle, and /supported. These routes are all created for you in this workflow with proper error handling and responses.
A seller will first hit /verify with their payment details to ensure the payment information is correct. Next they will hit the /settle endpoint with the same payment information to settle the paymet on the blockchain. The /supported endpoint is used to indicate to sellers which blockchains you choose to support in a programatic fashion.
Setup
Create a 1Shot API account Create 1Shot API wallets for the networks where you wish to facilitate token payments and load them with sufficient gas tokens. Using 1Shot Prompts, import the transferWithAuthorization functions for the tokens you will settle payments for. Import this workflow into n8n and create a credential to link the 1Shot API community node to your 1Shot API business account. Enter the token and network information into the payment token and network configuration nodes indicated by the sticky nodes. Turn on your workflow and settle payments!
Related Templates
Provide latest euro exchange rates from European Central Bank via Webhook
What is this workflow doing? This simple workflow is pulling the latest Euro foreign exchange reference rates from the E...
Automate Daily Keyword Research with Google Sheets, Suggest API & Custom Search
Who's it for This workflow is perfect for SEO specialists, marketers, bloggers, and content creators who want to automa...
USDT And TRC20 Wallet Tracker API Workflow for n8n
Overview This n8n workflow is specifically designed to monitor USDT TRC20 transactions within a specified wallet. It u...
🔒 Please log in to import templates to n8n and favorite templates
Workflow Visualization
Loading...
Preparing workflow renderer
Comments (0)
Login to post comments