title: How to check if payment completed in MPL?
body: <p>Using PayPal MPL, how could the back-end server check whether the payment completed?
  As I understand the MPL controls the entire flow, no need for back-end server calls - but what if the server needs to validate and register the purchase completion.</p>
  
  <p><strong>UPDATE</strong> First of all, thank you for the answers so far.
  We have two requirements/preferences that can guide us to refine our process:</p>
  
  <ol>
  <li>The payment should be validated as soon as possible. Customer should access the paid services right after the purchase.</li>
  <li>For the validation process we should use minimum proof data from the app. Consider the following scenario: purchase completed, but the back-end server went offline - so the client app needs to store the proof data (transaction id, payment id) in order to validate later. But what if the client looses the proof data (app reinstall, etc.) in the meantime- how can then the client and the back-end server get back in sync?</li>
  </ol>
  
  <p>Because of <em>req #1</em>, we don't prefer IPN. According to the <a href="https://www.x.com/developers/paypal/products/instant-payment-notification" rel="nofollow">IPN documentation</a>:</p>
  
  <blockquote>
    <blockquote>
      <p>Although PayPal usually processes IPN messages immediately, IPN is not synchronized with actions on your website. Internet connectivity is not always 100% reliable and IPN messages can be lost or delayed. The IPN service automatically resends messages until the listener acknowledges them. The service resents messages for up to 4 days.
      Because IPN is not a real-time service, your checkout flow should not wait for the IPN message before it is allowed to complete. If the checkout flow is dependent on receiving an IPN message, processing can be delayed by system load or other reasons. Configure your checkout flow to handle a possible delay.</p>
    </blockquote>
  </blockquote>
  
  <p>The process described in the iOS SDK docs involves various API calls to verify the payment, but those calls need some proof data from the client app. But what if the client looses proof data? (<em>req #2</em>) Maybe the proof data could be sent to the back-end <strong>before</strong> the payment? In that case the back-end server could store the proof data until it can be validated. That process would go like this:</p>
  
  <ol>
  <li>Client app initiates a PayPal payment</li>
  <li>Client app sends proof data/payment info to the back-end server</li>
  <li>Back-end server stores payment info</li>
  <li>Client app follow through the payment process with PayPal</li>
  <li>Client app notifies back-end that the payment can be validated (no additional data needed)</li>
  <li>Back-end server validates payment using the data from step 2.</li>
  </ol>
  
  <p>For this we need an API call with a parameter that is available in step 2, but most id-s are available only after payment completed. Any advices?</p>