Integration connectors with 3rd party services or APIs to extend application functionality. The functionality is written using ChatGPT-4.
StripeAPI is a web-based application built on .NET 6.0, designed to interact with Stripe's various services, specifically its balance and balance transaction services. Through its user-friendly endpoints, the application provides users with easy access to account balance details and lists of balance transactions. With robust error handling using middleware, the application ensures seamless communication with the Stripe platform, making financial data retrieval straightforward and efficient.
The application, using modern coding practices, promotes security by using dependency injection and the .NET Secret Manager for sensitive information. By embracing the principles of modularity and separation of concerns, StripeAPI ensures maintainability, scalability, and robustness.
-
Prerequisites:
- Install .NET 6.0 SDK.
- Clone the repository to your local machine.
-
Set Up Secret Manager: Navigate to the project root directory in the terminal and execute the following command to set your Stripe API key:
dotnet user-secrets set "Stripe:ApiKey" "YOUR_STRIPE_API_KEY"
-
Run the Application: Navigate to the project root directory and run the following command to start the application:
dotnet run
-
Retrieve Account Balance: Navigate to or use a tool like
curl
orPostman
to make a GET request:http://localhost:5000/stripe/balance
-
List Balance Transactions with Pagination: Navigate to or use a tool like
curl
orPostman
to make a GET request. You can adjust thelimit
andstartingAfter
parameters as needed:http://localhost:5000/stripe/balance-transactions?limit=10&startingAfter=txn_1J2L1cLbr7Y5X5Xe8i8Xad