Unlinked Refunds β Status, Response & Error Reference
Looking up the exact response shape, status values, validation layers, or recovery steps for an unlinked refund. For the integration walkthrough, see Unlinked Refunds API.
API Response Catalogβ
The complex object is trimmed for brevity. Refer to the API Spec for the full response structure.
- Unlinked refunds do not include a
paymentobject since there's no associated payment. - The
paymentMethodobject contains the credited card details. - No
refundAllocationsarray beyond the single direct credit.
Final Response β COMPLETEDβ
Sample Response β COMPLETED (HTTP 200)
{
"url": "http://api-stg.uhg.com:443/api/financial/commerce/nonprodcheckout/v2/refunds/1b9683da-5f0b-4444-8c5a-3958bd67353f",
"data": {
"id": "1b9683da-5f0b-4444-8c5a-3958bd67353f",
"status": "COMPLETED",
"reason": "REQUESTED_BY_CUSTOMER",
"merchantTransactionId": "6f76fa67-b887-4c36-a486-b425b86befbd",
"metadata": {
"orderId": "123486",
"purpose": "issueCredit"
},
"merchant": {
"id": "b955db5e-aef2-47de-bbb9-c80b9cc16e8f"
},
"refundAllocations": [
{
"id": "f771d07c-c827-41a4-8dbd-6791ff390f00",
"amount": 100,
"status": "COMPLETED",
"paymentMethod": {
"id": "09584dad-194e-455a-b980-0bb3abf10fe4",
"nickname": "string",
"paymentMethodDetails": {
"type": "CARD",
"last4": "4242",
"expiryMonth": 12,
"expiryYear": 2045,
"nameOnCard": "string",
"cardBrand": "VISA",
"status": "ACTIVE",
"zipCode": "12345",
"cardCategories": [],
"hsaTagged": false
},
"default": true
}
}
]
}
}
Final Response β FAILED (HTTP 422)β
Sample Response β FAILED (HTTP 422)
{
"title": "REFUND_ERROR",
"detail": "Refund allocation processing failed for all records. Check individual records for error details",
"status": 422,
"refund": {
"id": "7dd80cba-910e-493f-9eb3-20f8324a1dcc",
"status": "FAILED",
"reason": "REQUESTED_BY_CUSTOMER",
"merchantTransactionId": "1f401160-e825-415f-81af-056fac57bba4",
"metadata": {},
"merchant": {
"id": "b955db5e-aef2-47de-bbb9-c80b9cc16e8f"
},
"refundAllocations": [
{
"id": "c4f347e5-a4fa-40de-883e-00cfa6352e31",
"amount": 99999999,
"status": "FAILED",
"error": {
"title": "REFUND_ERROR",
"detail": "The amount given exceeds the allowed refund limit"
},
"paymentMethod": {
"id": "09584dad-194e-455a-b980-0bb3abf10fe4",
"nickname": "string",
"paymentMethodDetails": {
"type": "CARD",
"last4": "4242",
"expiryMonth": 12,
"expiryYear": 2045,
"nameOnCard": "string",
"cardBrand": "VISA",
"status": "ACTIVE",
"zipCode": "12345",
"cardCategories": [],
"hsaTagged": false
},
"default": true
}
}
]
}
}
Status Definitions & Lifecycleβ
Unlinked refunds have simpler status transitions compared to split tender refunds since they process as a single operation.
| Status | Description |
|---|---|
INITIATED | Refund request accepted; async validation and submission started |
PENDING | Refund is being processed by the payment processor (Stripe) |
COMPLETED | Refund processed successfully; funds returned to card |
FAILED | Refund failed; no funds returned |
PENDINGis optional β refunds may transition directly fromINITIATED β COMPLETEDorINITIATED β FAILED.
Refund Lifecycleβ
Status Flowβ
Validation Layersβ
Unlinked refunds go through strict two-layer validation:
| Layer | Error Code | Examples |
|---|---|---|
| Schema Validation | 400 INVALID_REQUEST | Missing fields, invalid structure, wrong data types |
| Business Validation | 422 UNPROCESSABLE_ENTITY | CARD-only violation, duplicate transaction, customer mismatch |
Webhook Eventsβ
CCG sends one webhook per refund request.
- onRefundSuccess β full payload schema for success events
- onRefundFailed β full payload schema for failure events
| Event | Trigger | Notes |
|---|---|---|
REFUND_SUCCESS | Refund completed successfully | Funds returned to card |
REFUND_FAILED | Refund failed | No funds returned |
REFUND_PENDING | Refund queued (rare) | Awaiting processor balance |
Unlinked refund webhooks do not include a paymentId field since there's no associated payment. The payload includes: refundId, merchantTransactionId, amount, status, vendorMerchantCustomerId, paymentMethod (optional β may not always be returned by Stripe).
Recovery Steps for Failed Refundsβ
| Situation | Action |
|---|---|
| Customer not found | Verify customer HSID and ensure customer exists in system |
| Payment method not associated | Check payment method belongs to customer; update association |
| Invalid payment method type | Use CARD payment method only; ACH not supported |
| Expired or deleted card | Use alternate payment method or manual credit outside CCG |
| Amount exceeds limit | Reduce amount to $10,000 USD or less |
| Duplicate transaction ID | Confirm the original refund outcome; use a new ID only for a confirmed new request |
| Stripe customer creation failed | Check Stripe account configuration; contact support if persists |
Recovery after an uncertain outcomeβ
If the request times out, do not immediately submit it again with either the same or a new merchantTransactionId.
- If the response included a
refundId, retrieve the refund usingGET /v2/refunds/{refundId}. - If no
refundIdwas received, contact the CCG representative with the merchant ID,merchantTransactionId, environment, timestamp, and correlation ID so CCG can confirm whether the refund exists. - Submit another refund only after the original outcome is confirmed and the recovery owner approves a new request. Use a new unique
merchantTransactionIdwhen a new request is required.
V1 vs V2 API Comparisonβ
Unlinked Refund is supported in both v1 and v2 APIs, but v2 provides enhanced validation and clearer error handling.
| Aspect | V1 API (POST /v1/refund) | V2 API (POST /v2/refunds) |
|---|---|---|
| Validation | Basic validation only | Strict two-layer validation (Schema + Business) |
| Error Messages | Generic error responses | Detailed, actionable error codes |
| Customer Required | Yes (in request body) | Yes (in request body with HSID) |
| Amount Limit | $10,000 USD | $10,000 USD |
| Duplicate Detection | Limited | Strict enforcement per merchant transaction ID |
| Webhook Events | Same event names | Same event names, better payload structure |
| Status | INITIATED, COMPLETED, FAILED | INITIATED, PENDING, COMPLETED, FAILED |
FAQβ
Q: What's the difference between linked and unlinked refunds?
- Linked refunds reference a
paymentIdand reverse a specific charge. Unlinked refunds usepaymentMethodIdand credit a card directly without a prior payment.
Q: Why is customer information required?
- Customer validation ensures the payment method belongs to the intended recipient and provides proper audit trail and fraud prevention.
Q: Can I issue multiple unlinked refunds to the same card?
- Yes, but each must use a unique
merchantTransactionId. You cannot reuse the same transaction ID.
Q: What happens if the customer doesn't exist?
- The request fails with
422 UNPROCESSABLE_ENTITY: Customer not found. Ensure the customer exists in the system before attempting an unlinked refund.
Q: What if the payment method is not associated with the customer?
- The request fails with
422 UNPROCESSABLE_ENTITY: Payment method not associated with customer. Verify the association before retry.
Q: When is a refund status final?
COMPLETEDandFAILEDare terminal states.INITIATEDandPENDINGare transient.
Q: Can I issue an unlinked refund exceeding $10,000?
- No. The maximum amount per unlinked refund is $10,000 USD (1,000,000 cents). Requests exceeding this limit are rejected.