Refund Service Overview
Overview
The Refund Service helps you track and synchronize refund statuses across payment processors using the Java SDK. While the Payment Service handles initiating refunds, this service provides dedicated operations for retrieving refund information.
Business Use Cases:
Refund status tracking - Check the current status of pending refunds to inform customers
Financial reconciliation - Synchronize refund states with your internal accounting systems
Webhook processing - Handle asynchronous refund notifications from payment processors
Customer service - Provide accurate refund status information to support teams
Operations
Retrieve refund status from the payment processor. Tracks refund progress through processor settlement for accurate customer communication.
Checking refund status, reconciling refund states, customer inquiries
SDK Setup
import com.hyperswitch.prism.PaymentClient;
PaymentClient paymentClient = PaymentClient.builder()
.connector("stripe")
.apiKey("YOUR_API_KEY")
.environment("SANDBOX")
.build();Common Patterns
Refund Status Tracking Flow
Flow Explanation:
Initiate refund - First, call the Payment Service's
refundmethod to initiate the refund.Check status - Call the Refund Service's
getmethod with theconnectorRefundId.Poll for updates - For refunds that start as PENDING, periodically call
getto check for status updates.
Next Steps
Payment Service - Initiate refunds and process payments
Dispute Service - Handle chargebacks that may result in refunds
Event Service - Process asynchronous refund notifications
Last updated
Was this helpful?

