Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/neoito-hub/razorpay_billing_block
https://github.com/neoito-hub/razorpay_billing_block
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/neoito-hub/razorpay_billing_block
- Owner: neoito-hub
- Created: 2024-03-01T08:43:44.000Z (10 months ago)
- Default Branch: main
- Last Pushed: 2024-03-23T11:32:38.000Z (9 months ago)
- Last Synced: 2024-03-23T12:48:11.534Z (9 months ago)
- Language: JavaScript
- Size: 72.3 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Razorpay Billing Block by Appblocks Architecture
This Razorpay billing block provides developers with a generic code block for integrating billing functionality into their applications seamlessly.
## Setup for running using Docker
1. Copy `sample.ngrok.yml` to `ngrok.yml` and add your ngrok auth and IP. Set up an edge custom domain in the ngrok dashboard for Razorpay webhooks.
2. Update the domain in Razorpay with webhooks.
3. Copy `sample.env.function` to `env.function`.
4. Run the following commands:
```bash
docker build .
docker-compose up
```
This will run the application on port 5000 and tunnel it to the configured ngrok domain.### Postman Collection
Import the provided Postman collection (`RAZORPAY_BILLING_BLOCK.postman_collection.json`) to access all API collections conveniently in Postman.
## Setup Requirements For Manual Start
1. **Hashicorp Vault**: Ensure Hashicorp Vault is installed and running. Update its configuration in the environment file.
Hashicorp Vault installation reference
machine : https://developer.hashicorp.com/vault/tutorials/getting-started/getting-started-install
2. **Database Setup**: Navigate to `shared` and perform database migration and seeding using the following commands:
```
cd shared && npm run prisma:db:push && npm run prisma:seed:dev
```## Starting the Block
To start the billing block, run the following command from the root directory:
```
bb start
```## Razorpay Account
Developers must have an account on Razorpay. Make sure to obtain the necessary API credentials.
## Vault API Usage
Use Vault APIs for saving secrets into Vault. Ensure that the vendor name is passed to all APIs related to Razorpay. Refer to `shared/razorpay/module` for more details.
## Currency Setup
Developers need to set up currencies and default currency using the provided add currency APIs.
## Subscription APIs
Once the setup is complete, developers can try out all APIs related to subscription functionality.