Giter Site home page Giter Site logo

adityasanehi / success-webhook-api Goto Github PK

View Code? Open in Web Editor NEW

This project forked from fyko/success-webhook-api

0.0 0.0 0.0 42 KB

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

License: Apache License 2.0

TypeScript 85.48% JavaScript 14.52%

success-webhook-api's Introduction

๐Ÿ† 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

Fyko#1

License

Licensed under the Apache 2.0 License

success-webhook-api's People

Contributors

fyko avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.