Skip to content
This repository has been archived by the owner on Sep 14, 2023. It is now read-only.

Fyko/success-webhook-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

3 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿ† Success Webhook API

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.

Usage

Let this repo be an inspiration. It should give you the rough idea of how to make a success endpoint on your API.

Authentication

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

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.

Demo

The package manager for this project is pnpm, but the same commands will work with npm or yarn

  1. Run pnpm install to install dependencies
  2. Rename .env.example to .env and update all the variables (LICENSE_KEY is what you'll set your header to in the test file)
  3. Input your LICENSE_KEY from above into the request header on line 27 of tests/index.js
  4. Run pnpm start to start the webserver
  5. Run node tests/index.js to start spamming the API with success requests

Contributing

  1. Fork!
  2. Clone! - git clone https://github.com/johndoe/success-webhook-api
  3. Make new branch! - git checkout -b my-feature
  4. Commit! - git commit -am 'I did something!'
    - ensure your commit message follows the Angular Commit Message Guidelines
  5. Push it! - git push origin my-feature
  6. Pull it!
  7. Shake it!

Author

Success Webhook API by Carter "Fyko" Himmel

#1

License

Licensed under the Apache 2.0 License

About

๐Ÿ† an API endpoint to receive "successful checkout" requests from automation software and send them to a discord webhook

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published