So I have my admin page for my website and I use Paypal to process payments and I was wondering if there is a way to get a report with the total earning. I read the documentation but I only found generating transaction reports.
In case I didn't make my self clear what I mean is I request the API and it returns a float or int with the total earnings so I can display the amount on my admin page.
You might be able to calculate a running total minus fees by setting up and listening for transaction Webhooks, specifically PAYMENT.CAPTURE.COMPLETED
I would just use the Reports features in PayPal.com rather than obsessing about building your own counter.
Related
I am currently setting-up stripe for a SaaS company to be able to order recurrent products with a tiers price based on volume (see https://stripe.com/docs/api/prices/object#price_object-tiers_mode). I would like to limit the maximum number of units allowed (a user can only order up to 100 units and after the checkout is impossible). Has someone found a way to do it?
Thanks for your help,
Best
This is something that would be implemented by your integration, checked & enforced via your application logic. If your customer reaches 100 units, you would prevent them from increasing it or alternatively return an error from your server when they try to initiate payment.
Restricting quantity like you ask is not supported by the Stripe API.
I am using youtube data API and I didn't find anything related to the overall daily usage of API limit.
I can check the same on the console and I visited the below link but here I can only calculate the stats from the youtube web portal.
https://developers.google.com/youtube/v3/determine_quota_cost
Is there any means that I can get the overall daily usage of from any API provided by youtube.
Yes. Go to here, click on the menu in the top left corner, IAM & Admin and then Quotas.
Recently I had this requirement too. But then I moved on as it was not a blocker for me.
Alternatively I would suggest keeping track of quota units consumed. You can easily calculate how many quota units are consumed from the chart in the link you provided. You can get the number of quota units left by subtracting the sum of units consumed from 10000 (Current default limit, or any number assigned to your account if you requested for more).
The quota gets reset every midnight PST.
FYI, the api does respond with an HTTP 403 and error code 403 with reason = dailyLimitExceeded. Once you encounter this then you can stop sending out more api calls till midnight.
If you ever get to know of an API endpoint please update this question so that it helps people like us.
1) Hey i run API AdSense and im trying to get the total payment per month but filtered by site as well.
At the moment i can only extrect the amount of payment per month via https://www.googleapis.com/adsense/v1.4/accounts/accountId/payments but there is no way to filter there by Site
I can filter by site in this API https://www.googleapis.com/adsense/v1.4/accounts/accountId/reports but the payment that i get there are not accurate.
2) How can i get from the API the "InvalidTraffic" parameter per site ?
Thanks a lot in advance
1) Reporting is the correct way to get this information. Common causes of metric discrepancies are using the wrong time zone and using the wrong currency type. Also, be aware that "earnings up to yesterday are accurate, [but] more recent earnings are estimated due to the possibility of spam, or exchange rate fluctuations."
2) Invalid Traffic isn't exposed in the API.
My problem is, the amount will differ every cycle but in recurring I have to pass only one fix amount which is depend on customers how they use our service.
I read reference transaction doc but i didn't got whole point.
I don't have any problem with manage from my side and set charge to user dynamically by my side but how it will work.
Paypal is not providing metered billing concept. For that I have use STRIPE later that time.
Is there a way to get historical forecasts from the wunderground API? For instance, find out the predicted high temperature 5 days from an arbitrary date in the past?
If you go to the Wunderground website, under Key Settings, there is a spot to request access to history data, in the area where you purchase a key. Fill out the form, and you can expect a response within a couple days telling whether you have access to history data. Once you do, look under Documentation to find out how to use it.
You can sign up for a developer account (free) and that gives you access to 500 calls/day or 10 calls/minute. You can use that to make calls to the history API and test it.
http://api.wunderground.com/weather/api