{"id":13660022,"url":"https://github.com/jasielmacedo/steam-microtransaction-api","last_synced_at":"2025-04-24T15:31:36.371Z","repository":{"id":47020963,"uuid":"340399264","full_name":"jasielmacedo/steam-microtransaction-api","owner":"jasielmacedo","description":"An intermediate api to handle steam microtransactions using steam web services. Ready to use with Unity, Unreal, Godot and so on","archived":false,"fork":false,"pushed_at":"2023-02-19T17:58:32.000Z","size":957,"stargazers_count":42,"open_issues_count":0,"forks_count":20,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-08-02T05:11:22.591Z","etag":null,"topics":["api","games","in-game-purchase","microtransactions","steam","steamworks","steamworks-api","steamworks-net","typescript","unity"],"latest_commit_sha":null,"homepage":"https://jasielmacedo.github.io/steam-microtransaction-api/","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jasielmacedo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2021-02-19T14:48:03.000Z","updated_at":"2024-07-16T04:58:29.000Z","dependencies_parsed_at":"2024-01-22T03:57:36.979Z","dependency_job_id":"3d599196-41cf-4336-ad20-3c894971618a","html_url":"https://github.com/jasielmacedo/steam-microtransaction-api","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jasielmacedo%2Fsteam-microtransaction-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jasielmacedo%2Fsteam-microtransaction-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jasielmacedo%2Fsteam-microtransaction-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jasielmacedo%2Fsteam-microtransaction-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jasielmacedo","download_url":"https://codeload.github.com/jasielmacedo/steam-microtransaction-api/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223958147,"owners_count":17231746,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api","games","in-game-purchase","microtransactions","steam","steamworks","steamworks-api","steamworks-net","typescript","unity"],"created_at":"2024-08-02T05:01:15.055Z","updated_at":"2024-11-10T13:31:39.258Z","avatar_url":"https://github.com/jasielmacedo.png","language":"TypeScript","funding_links":[],"categories":["TypeScript"],"sub_categories":[],"readme":"**Note: This repository is currently being updated, and a version with recent updates from steam will be available shortly.**\n\n# Steam Microtransaction Bridge API [![Chat](https://img.shields.io/badge/chat-on%20discord-7289da.svg)](https://discord.gg/NF7Fuhr2FZ)\n\n[![Deploy](https://www.herokucdn.com/deploy/button.svg)](https://heroku.com/deploy?template=https://github.com/jasielmacedo/steam-microtransaction-api)\n\n[![Deploy to DO](https://www.deploytodo.com/do-btn-blue.svg)](https://cloud.digitalocean.com/apps/new?repo=https://github.com/jasielmacedo/steam-microtransaction-api/tree/main)\n\nAn intermediate API to handle Steam microtransactions (In-Game Purchases) using Steam web services.\n\nYou can use this repo to fork and host an API to be used with Unity, Unreal, Godot, or any engine you want to develop a Steam game.\n\n## READ BEFORE USE\n\nThis Bridge API has been created based on the Steam Partner API recommendations.\n\nIf you need to implement microtransactions in your game, **you must create** a web service to handle and request the Steam WEB API, and that's precisely the purpose of this repository.\n\nTo help game developers save time and money, I've created a single codebase that enables them to implement microtransactions quickly.\n\nWith this repository, you can use Heroku or DigitalOcean to deploy your own API with just a few clicks. See [Heroku Git Deploy](https://devcenter.heroku.com/articles/git) or [DigitalOcean Deploy](https://docs.digitalocean.com/products/app-platform/quickstart/#destroy-an-app), or choose any other host you prefer.\n\n## WHY DO I NEED TO USE THIS REPO OR CREATE MY OWN? CAN I MAKE REQUESTS DIRECTLY FROM MY GAME?\n\nFirst of all, it's important to read Steam's recommendations on this topic: [https://partner.steamgames.com/doc/features/microtransactions](https://partner.steamgames.com/doc/features/microtransactions)\n\nSteam doesn't recommend calling the Steam Partner API directly from your game. Instead, you should create your own API to act as a bridge between your game and Steam. That's the purpose of this API repository.\n\n## HOW TO START THE API?\n\nThis is a TypeScript (Node.js v18+) based API, and you can use services like Heroku or DigitalOcean to publish it.\n\nTo get started, follow these steps:\n\n1.  Install Node.js v18+.\n2.  Clone or fork this repository.\n3.  Generate your Steam WEB API key.\n\nTo run the API locally and for testing, duplicate the file `env.example` and rename it to `.env`, and then update it with the correct values.\n\n4.  Run `yarn` to install the dependencies.\n5.  To test if everything is working, run `yarn test`.\n6.  To start the application, run `yarn start`.\n\n### CONFUSION ABOUT WEB API KEY GENERATION FOR STEAM IN-APP PURCHASES\n\nThere is some confusion about which web key to use for Steam in-app purchases and in-game API integration. Here are the instructions for generating the correct key:\n\n1.  Go to the [Steam Developer Page](https://partner.steamgames.com/dashboard).\n2.  Click on the \"Menu\" button, and then select \"User \u0026 Permissions.\"\n3.  Click on \"Manage Groups\" and select your app's name.\n4.  On the sidebar, you'll see a link that says \"Generate WebAPI Key.\" Click on that link to generate the proper key.\n\n## LIST OF PRODUCTS\n\nTo prevent users from sending arbitrary amounts for products, there is a file called `products.json` in the `src/` directory. Make sure to replace the ID and amount according to your list of products.\n\n## INTEGRATING WITH YOUR GAME\n\nYou can check the documentation of this API here: [https://jasielmacedo.github.io/steam-microtransaction-api/](https://jasielmacedo.github.io/steam-microtransaction-api/)\n\nThe flow is as follows:\n\n1.  The user (player) clicks on the UI product.\n2.  Your game calls the `/InitPurchase` endpoint to start the purchase.\n3.  The game will display a confirmation dialog (inside the game).\n4.  The user buys the item (pays for it).\n5.  The game receives a callback confirmation about the purchase.\n6.  Your game calls the `/FinalizePurchase` endpoint.\n7.  That's it.\n\nIf the user has parental control and the callback was not called, you can check the status by calling the `/CheckPurchaseStatus` endpoint.\n\n### SECURITY CHECK\n\nIn-game purchases are not complicated, but you need to be sure that the Steam user is reliable. To avoid scammers, simply call the `/GetReliableUserInfo` endpoint. If the return is true, you can start the microtransaction.\n\n## EXAMPLE WITH UNITY (C#)\n\nYou can check the example folder to see an example using Unity.\n\n## ABOUT\n\nYou might be wondering, \"Has this code been properly tested?\" I used a similar version of this code inside a game called Deliverace. It's no longer available on Steam, but this code works.\n\nIf you have any questions, suggestions, or issues, feel free to use the Issues area.\n\n## CONTRIBUTION\n\nYou can contribute by opening a pull request. Together, we can help many developers implement in-game purchases.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjasielmacedo%2Fsteam-microtransaction-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjasielmacedo%2Fsteam-microtransaction-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjasielmacedo%2Fsteam-microtransaction-api/lists"}