Reputation: 247
I am using API of the payment gateway which is used by our ASP.NET Core app to retrieve the history of customer's payments when they open the "Payments" page.
The question is this a good practice to always retrieve this info from the payment service's API or is it better to store a local copy of these objects, since this will be faster?
things to consider:
P.S.: The stack I am using:
Upvotes: 0
Views: 95
Reputation: 2940
Of course, it completely depends on your scenario If you use the api. The only problem is that your server uses a lot of bandwidth in high number of requests, and things like latency may not be pleasant for your users. In general, it is better to have a copy in your database, even if that API server is out of reach Your application will not have any problems and will work properly
Upvotes: 1