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
.envfile (at very least setPAXFUL_API_SECRETandOFFER_HASHES) - Run
npm ito 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.jsto start the application - Create webhook for
trade.startedevent (scroll to the bottom of Direct access section). For target URL use one that you got in step 5), but append to it/paxful/webhooksuffix. 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