A sample application that you can connect to your account on Paxful so it would greet customers when a new trade is started upon one of your offers.
Use it at your own risk!
- Create an offer on Paxful (if you don't have one yet)
- Update
.env
file (at very least setPAXFUL_API_SECRET
andOFFER_HASHES
) - Run
npm i
to install dependencies - Deploy the app somewhere OR use
ngrok
(for ngrok howto see below). As a result you should have a publicly accessible URL - Run
node app.js
to start the application - Create webhook for
trade.started
event (scroll to the bottom of Direct access section). For target URL use one that you got in step 5), but append to it/paxful/webhook
suffix. So if you hadhttps://example.com
, then when configuring webhooks you should sethttps://example.com/paxful/webhook
The application by default will be listening on http://localhost:3000, so if you haven't changed the port, then
once you have ngrok
installed on your machine, you can run the following command to receive a publicly accessible
URL that you can use for registering as a webhook target on paxful.com:
ngrok http 3000