On the PayPal developer site they state it is possible to capture 75 US Dollar or 15% percent more than the original authorized amount of a payment. I am currently using the order API because I can't seem to figure out how to create a Payment from the payment API. My question is the following: how can I capture a different amount then the authorized amount(order API). In the capture section of the Order API I can't give up a new amount. I tried to patch the order first but after the amount was authorized the status of the order is COMPLETED, so the value couldn't be updated.
I think the reason I don't understand how to do it is because I don't know the difference between Order and Payment API. I would like to use the payment API but I can not find an PayPal API to create a payment.
Use the order API with "intent":"authorize"
. The completed order will have a payment authorization object in the response.
Use the payment API to capture the authorization object for the desired amount, https://developer.paypal.com/docs/api/payments/v2/#authorizations_capture