Skip to main content

refund Method

Overview

The refund method returns funds to a customer's payment method.

Request Fields

FieldTypeRequiredDescription
merchantRefundIdStringYesYour refund reference
connectorTransactionIdStringYesTransaction ID
refundAmountMoneyNoAmount to refund
reasonStringNoRefund reason

Response Fields

FieldTypeDescription
statusRefundStatusPENDING, SUCCEEDED
connectorRefundIdStringRefund ID

Example

Map<String, Object> request = new HashMap<>();
request.put("merchantRefundId", "refund_001");
request.put("connectorTransactionId", "pi_xxx");
request.put("refundAmount", Map.of("minorAmount", 1000, "currency", "USD"));

Map<String, Object> response = paymentClient.refund(request);