Search code examples
paypalpaypal-sandbox

Reauthorization of changed amount after approval


I have successfully implemented CONTINUE pay flow with server side calls. The process is:

  1. Create order using my API
  2. Letting user approve it with CONTINUE button
  3. And then capture the order it when user clicks Submit button using my API

The problem is that in my case user is able to change the items in the very same page they approve the order. That means that it may happen that after second step they will decide to add items to basket, in that case I'm calling patch order which may eventually increase the amount. In PayPal documentation stands:

For any payment type, you can capture less than or the full original authorized amount. You can also capture up to 115% of or $75 USD more than the original authorized amount, whichever is less.

But what happens if user decides they will increase order's amount even more, then they could proceed to submit the order and capturing order call may fail in my understanding. Because approval was for e.g $100, but after patching order and the capture I'm asking for $200. Is it possible to let user re-authorize the order without using redirects? Can even this scenario happen (in sandbox I couldn't reproduce that)? What's the best way to handle it?


Solution

  • You can also capture up to 115% of or $75 USD more than the original authorized amount, whichever is less.

    This applies only to captures of authorizations, specifically -- i.e. orders in a completed state with intent:authorize that have returned an authorization object for later capture within 29 days.

    It does not apply to orders that have not been completed -- and it will never apply to intent:capture orders since they do not return an authorization object, and are instead for direct capture within 3 hours of checkout approval.


    What's the best way to handle it?

    Patch and capture the order for the required amount. Ensure the payer is informed about what they are going to be charged before confirming the payment on your site.