Refund Management Schemas
API endpoints for processing refunds and handling payment reversals.Endpoints
| Method | Endpoint | Description |
|---|---|---|
| POST | /v1/refunds/initiate | Initiate refund for transaction |
| GET | /v1/refunds/:refundId/status | Get refund status |
POST /v1/refunds/initiate
Initiate a refund for a completed transaction.Request Body
Request Schema
| Field | Type | Required | Description |
|---|---|---|---|
transactionId | string | Yes | Original transaction ID |
amount | number | Yes | Refund amount |
reason | string | Yes | Reason for refund |
refundType | string | Yes | Type of refund (full or partial) |
metadata | object | No | Additional metadata |
Response Schema
Response Fields
| Field | Type | Description |
|---|---|---|
refundId | string | Unique refund identifier |
status | string | Current refund status |
estimatedProcessingTime | string | Estimated processing time |
GET /v1/refunds/:refundId/status
Get the current status and details of a refund.Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
refundId | string | Yes | Refund identifier |
Response Schema
Refund Schema
| Field | Type | Description |
|---|---|---|
refundId | string | Unique refund identifier |
originalTransactionId | string | Original transaction ID |
amount | number | Refund amount |
originalAmount | number | Original transaction amount |
currency | string | Currency code |
status | string | Refund status |
refundType | string | Type of refund |
reason | string | Refund reason |
initiatedBy | string | Who initiated the refund |
processedAt | string | Processing timestamp |
createdAt | string | Creation timestamp |
updatedAt | string | Last update timestamp |
Refund Status Types
| Status | Description |
|---|---|
pending | Refund initiated, awaiting processing |
processing | Refund is being processed by bank |
completed | Refund successfully processed |
failed | Refund failed or was rejected |
cancelled | Refund was cancelled |
Refund Types
| Type | Description |
|---|---|
full | Complete refund of transaction amount |
partial | Partial refund of transaction amount |