PaymentTransaction paymentTransaction = PaymentTransaction.createPaymentTransaction();
paymentTransaction.setTransactionType(net.authorize.TransactionType.PRIOR_AUTH_CAPTURE);
paymentTransaction.setTransactionId(transactionId);
paymentTransaction.setOrder(order);
Transaction transaction = createTransaction(TransactionType.CREATE_CUSTOMER_PROFILE_TRANSACTION);
transaction.setPaymentTransaction(paymentTransaction);
transaction.setCustomerProfileId(customerProfileId);
Result<Transaction> result = executeTransaction("settle", userId, amountToSettle,transaction);
Map<ResponseField,String> responseMap = result.getDirectResponseList().get(0).getDirectResponseMap();
ResponseReasonCode responseReasonCode = ResponseReasonCode.findByReasonCode(responseMap.get(ResponseField.RESPONSE_REASON_CODE));