PayPal API - Increase order amount after authorization. Best checkout process?
P粉807397973
P粉807397973 2024-03-30 19:45:14
0
1
549

We are using PayPal/Braintree API.

What is the correct way to handle increasing order amounts (eg: delivery charges) after the original order amount has been authorized?

Ideally we would like to send the customer to PayPal once and then they select their preferred shipping method on our shipping page without having to send the customer back to PayPal to re-verify.

is it possible?

Delivery amounts may be substantial, which will exceed the 115% / $75 limit.

Thanks.

P粉807397973
P粉807397973

reply all(1)
P粉891237912

Don’t do this?

PayerApprovalAfter payment but before authorizing the transaction, the review steps are displayed. Use the selected address to calculate any applicable shipping and taxes. If applicable, please provide shipping method options.

When the new total is calculated and the user gives final confirmation, create a Braintree transaction with the new amount (PayPal payment method in Braintree, or more generally using Braintree ). This is similar to using the non-Braintree PayPal REST API to capture orders with updated (patched) amounts.

One last detail is that since you have a review step after approval, if using the PayPal SDK you should set commit: false (default is true) so that the last button has the correct wording to indicate that there is further Steps back to your website. For Braintree this looks like:

paypalCheckoutInstance.loadPayPalSDK({
  intent: ????????? , // Braintree defaults this to 'authorize'
  currency: 'USD',
  commit: false,
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template