When you create a new refund, you must specify the Payment object on which to create it.
Creating a new refund will refund a payment that has previously been created but not yet fully refunded. Funds will be refunded to the shopper that was originally charged.
You can optionally refund only part of a charge. You can do so multiple times, until the entire payment has been refunded.
Once entirely refunded, a payment can’t be refunded again. This method will return an error when called on an already-refunded payment, or when trying to refund more money than is left on the payment.
Refunds are final and can not be reversed.
In addition to the Errors applicable to all API endpoints, the following errors are specific to creating a refund:
||No payment was found meeting the requirements. Make sure to use the right
paymentId and API key.
test objects can only be accessed using test keys and
live object with live keys.
||Available amount on payment is insufficient to handle the request.