Instead of packaging your success webhook URL with you application, have your program post to this success webhook API to prevent your success webhook being exposed and spammed by douchebags.
Let this repo be an inspiration. It should give you the rough idea of how to make a success endpoint on your API.
Authentication is handled in authentication.ts. Here, you can manage some sort of connection to your database and request provided Authorization
header every request.
Embeds are recived from the POST request body. I strongly reccomend you send the checkout data to the endpoint and build it here instead of sending the embed itself.
The package manager for this project is pnpm, but the same commands will work with npm
or yarn
- Run
pnpm install
to install dependencies - Rename
.env.example
to.env
and update all the variables (LICENSE_KEY is what you'll set your header to in the test file) - Input your LICENSE_KEY from above into the request header on line 27 of tests/index.js
- Run
pnpm start
to start the webserver - Run
node tests/index.js
to start spamming the API with success requests
- Fork!
- Clone! -
git clone https://github.com/johndoe/success-webhook-api
- Make new branch! -
git checkout -b my-feature
- Commit! -
git commit -am 'I did something!'
- ensure your commit message follows the Angular Commit Message Guidelines - Push it! -
git push origin my-feature
- Pull it!
- Shake it!
Success Webhook API by Carter "Fyko" Himmel
Licensed under the Apache 2.0 License