title: How to get a transaction id from a successful payment?
body: <p>I'm using PHP and the REST Paypal APIs to make simple payments. I'm able to call the <code>Pay</code> API and make a successful payment.</p>
  
  <p>However, I don't know how to get the transaction id. I need to store it in order to make a refund in the case the customer complains on something. By now I'm only able to get it from my email (I get an email about the payment including the transaction id). So I read the email, take the transaction id and pass it to the web app in order to make a refund. I'd like to get such transaction id via some REST API too.</p>