PayPal GetBalance in IPN Script - api

At the end of my PayPal IPN Script I'm trying to get my new balance with the GetBalance API.
Unfortunately sometimes the balance I receive is correct, sometimes it's the balance without the latest value.
I couldn't find any correlation neither with txn_type nor with payer_status or payment status.
Is there anything I'm missing?
Thanks and best regards
Daniel

Related

How to get payout using PayPal API, with only batch_sender_id

Sometimes the PayPal API fails to give back a payout_id but still processes a payment (i.e. because the server is down).
I have some payments that I would like to fetch information for, but only have the batch_sender_id (the id that I gave each payment).
Is there a way to get the payment information with PayPal's API? There doesn't seem to be a way to fetch payments without the payout_id.
Resubmit with the same batch_sender_id, it should return html code 400 with a link to the resource that contains the previously submitted request. So before making a request to PayPal be sure to store the batch_sender_id so you can re-request later if you do not get a response.

Paypal Express Checkout not sending money now live

Please help. I have recently updated the paypal express checkout system on my website (where it leaves the website to go to paypal for payment, then returns).
It was all working fine in sandbox. I went to put it live, and I have found the correct API credentials, but it won't work.
It takes me to the paypal page fine. It takes payment and returns me to the payment return url. All fine. But no payment actually moves anywhere.
What am I doing wrong?!
Thanks.
It takes me to the paypal page fine. It takes payment and returns me to the payment return url. All fine. But no payment actually moves anywhere.
From you declaring that, it seems that you are either not performing the DoExpressCheckout API call, which is the call that moves the money, OR you are getting an error with your DoExpressCheckout call. The flow and error codes for Express Checkout can be found here.
On PayPal pay attention to the button text -
If it reads "Agree and Pay" - then you have configured PayPal to take payment
If it reads "Agree and Continue" then you have only set up the transaction but PayPal is waiting for you to send a confirmation to take payment (there is no DoExpressCheckoutCall)

Paypal IPN INCOMPLETE status cause

I am new to the paypal api, but have integrated it into my site. Every transaction has 2 receivers using the adaptive payments api. Every once in awhile I get an ipn response with status of INCOMPLETE. Reading the documentation it says this status is because
Some transfers succeeded and some failed for a parallel payment or, for a delayed chained payment, secondary receivers have not been paid
Why would only one transaction work? Only the first recipient is getting the money causing problems. What is the best way to handle this? Anyway to immediately refund the buyer with the first recipients payment?
You could reverse all payments if any of them in the request fail using the reverseAllParallelPaymentsOnError parameter.
xs:boolean (Optional) Whether to reverse parallel payments if an error
occurs with a payment. Allowable values are: true – Each parallel
payment is reversed if an error occurs false – Only incomplete
payments are reversed (default)

Running balance amount from Paypal API

I would like to get the running balance of my PayPal account after each and every transaction.
I'm getting the same from the portal in a nice report format under "balance" column.
But I get no running balance when I'm using "TransactionSearch" and "GetTransactionDetails".
There is an API name "GetBalance", but it gives me the total balance which is what I don't required.
It would be really appreciated if you please help me getting this running balance after each and every transaction using the above two APIs.
Thanks much,
Arnab
The closest API to what you are looking for would be the GetBalance API. This should be the same balance that you see available in your PayPal account.

Paypal IPN return variables

I am using paypal IPN to make a subscription transaction. I created a subscription button from my sandbox paypal account, and tested the whole process. The first time i tried, it seemed to work okay, but the second, third and fourth time paypal IPN returned different variables from the first time.
First time important variables were: payment_gross,txn_id
Then it started to give me: amount3,mc_amount3
So payment_gross became amount3 or mc_amount3 and txn_id is not returned anymore. I did not change anything in the generated form. Any suggestions?
Sorry for my English
Thank you
When your ipn callback is called you must always first verify the message with paypal.
Are you doing this? Only then can you be sure it is a legitimate message.
I don't recall ever getting a message without txn_id, and I've used the sandbox a lot for testing.
I can't imagine paypal sending a message without txn_id via IPN as it would not relate to any transaction. The documentation does not mention this as a possibility either.
Anyway here is where I look up all the IPN/PDT variables for my site.