get Method
Overview
The get method retrieves the current status of a refund from the payment processor.
Business Use Case: Check refund status for customer inquiries.
Request Fields
| Field | Type | Required | Description |
|---|---|---|---|
connectorRefundId | string | Yes | The connector's refund ID |
merchantRefundId | string | No | Your refund reference |
Response Fields
| Field | Type | Description |
|---|---|---|
connectorRefundId | string | Connector's refund ID |
merchantRefundId | string | Your reference |
status | RefundStatus | PENDING, SUCCEEDED, FAILED |
refundAmount | Money | Refund amount |
statusCode | int | HTTP status code |
Example
SDK Setup
use OrchestratorXPrism\PaymentClient;
$paymentClient = new PaymentClient([
'connector' => 'stripe',
'apiKey' => 'YOUR_API_KEY',
'environment' => 'SANDBOX'
]);
Request
$request = [
'connectorRefundId' => 're_3Oxxx...'
];
$response = $paymentClient->getRefund($request);
Response
[
'connectorRefundId' => 're_3Oxxx...',
'merchantRefundId' => 'refund_001',
'status' => 'SUCCEEDED',
'refundAmount' => [
'minorAmount' => 1000,
'currency' => 'USD'
],
'statusCode' => 200
]
Next Steps
- Payment Service - Initiate refunds