Includes both the refunded amount (to Payer) and refunded fee (to Payee). Use the $amt->details field to mention fees refund details.
A sale transaction. Create a Sale object with the given sale transaction id.
Create a new apiContext object so we send a new PayPal-Request-Id (idempotency) header for this resource
Refund the sale
(See bootstrap.php for more on ApiContext
)
Sale Refund Sample
This sample code demonstrate how you can process a refund on a sale transaction created using the Payments API. API used: /v1/payments/sale/{sale-id}/refund