code: public void refundTransaction(final String transactionId, @Nullable final BigDecimal amount) {
          String url = Transactions.TRANSACTIONS_RESOURCE + "/" + transactionId;
          if (amount != null) {
              url = url + "?amount_in_cents=" + (amount.intValue() * 100);
          }
          doDELETE(url);
      }
docs: Refund a transaction
  
  @param transactionId recurly transaction id
  @param amount        amount to refund, null for full refund