Unlinked Refunds API
Crediting a payment method without referencing a prior charge β for goodwill credits or fixing a failed linked refund.
Unlinked Refund allows merchants to issue a refund directly to a payment method (typically a card) without referencing a prior payment transaction. Unlike linked refunds that reverse a specific charge, unlinked refunds credit a payment method independently β useful for goodwill credits, resolving failed linked refunds, or special circumstances. This guide covers how to initiate unlinked refunds, monitor status, and handle errors and webhook notifications.
Standard refunds? For refunds tied to an existing payment, use linked refunds β see Split Tender Refunds. Linked refunds reference a
paymentIdand can be partial or full based on the original payment amount.
- Refund model: Direct credit to payment method using
paymentMethodId - Payment method types: CARD only β ACH and bank accounts not supported
- Single refund per transaction: Only one unlinked refund allowed per (
merchantId,merchantTransactionId) pair - Customer required: Explicit customer object with identifiers must be provided
When to Useβ
Use Unlinked Refund when:
- No prior payment exists β issuing a goodwill credit or promotional refund
- Linked refund failed β original payment is unavailable, expired, or disputed
- Special circumstances β manual resolution requires a direct credit to customer's card
- Card replacement β customer has a new card and the old payment cannot be reversed
Note: Unlinked refunds are CARD-only and single-use per merchant transaction ID. The customer and payment method must be properly associated before processing.
For business context, eligibility, scenarios see Unlinked Refunds β Business Document.
- API Endpoint:
POST v2/refundsβ create an unlinked refundGET v2/refunds/{refundId}β poll refund status
- Scope: All operations are at the
merchantscope. - API Specs: Create Refund | Get Refund
- Webhook Specs: Refund Webhooks
- API:
v2 - Testing: Use Test Cards to simulate unlinked refund scenarios. See Test Cards
- β οΈ Error Handling: See Refund Error Codes for unlinked-specific errors and resolution steps
API Requestβ
Sample Request β POST v2/refunds
curl -X POST "https://api-stg.uhg.com/api/financial/commerce/nonprodcheckout/v2/refunds" \
-H "Authorization: <token>" \
-H "X-Merchant-Id: <merchantId>" \
-H "X-Upstream-Env: dev" \
-H "X-Source: <source>" \
-H "Content-Type: application/json" \
-d '{
"reason": "REQUESTED_BY_CUSTOMER",
"merchantTransactionId": "6f76fa67-b887-4c36-a486-b425b86befbd",
"customer": {
"firstName": "string",
"lastName": "string",
"hsid": "50daa5d5-37a1-48e8-91be-efd1743dbc2e",
"metadata": {}
},
"refundAllocations": [
{
"amount": 100,
"paymentMethodId": "09584dad-194e-455a-b980-0bb3abf10fe4"
}
]
}'
Request Field Detailsβ
| Field | Required | Type | Description |
|---|---|---|---|
amount | Yes | Number | Refund amount in cents (e.g., 5000 = $50.00). Must not exceed $10,000 USD (1000000). |
reason | Yes | String | Reason code (e.g., DUPLICATE, FRAUDULENT, REQUESTED_BY_CUSTOMER) |
paymentMethodId | Yes | UUID | Payment method to be credited (must be CARD type) |
merchantTransactionId | Yes | UUID | Unique identifier for this refund request. Reuse returns 422; it is not a replay key |
customer | Yes | Object | Customer information for validation |
customer.firstName | Yes | String | Customer first name |
customer.lastName | Yes | String | Customer last name |
customer.hsid | Yes | String | Customer HSID identifier (primary identifier) |
customer.metadata | No | Object | Additional customer metadata |
paymentIdmust be absent or null for unlinked refunds- If both
paymentIdandpaymentMethodIdare provided, the request is treated as a linked refund - Payment method must be CARD type β ACH and bank accounts will be rejected with
422 UNPROCESSABLE_ENTITY - Customer must exist and payment method must be associated with that customer
Poll Refund Statusβ
Refund processing is asynchronous β the API returns INITIATED immediately. Poll GET v2/refunds/{refundId} until the status settles to a terminal state (COMPLETED or FAILED).
Sample Request β GET v2/refunds/refundId
curl -X GET "https://api-stg.uhg.com/api/financial/commerce/nonprodcheckout/v2/refunds/{refundId}" \
-H "Authorization: <token>" \
-H "X-Merchant-Id: <merchantId>" \
-H "X-Upstream-Env: dev" \
-H "Accept: application/json"
API Responseβ
Unlinked refunds don't include a payment object (no associated payment), and there's no refundAllocations array beyond the single direct credit. Top-level status shows the outcome: COMPLETED, FAILED, or PENDING.
See Unlinked Refunds β Status, Response & Error Reference for the exact COMPLETED and FAILED response shapes.
Status Handlingβ
Polling Guidelinesβ
Refund processing is asynchronous β the API returns INITIATED immediately. Poll GET v2/refunds/{refundId} until the status settles to a terminal state (COMPLETED or FAILED).
- β
Supported:
- Poll the refund using
refundIdonly. - Get real-time status in a single response.
- See error details when refund fails.
- Poll the refund using
- β Not Supported:
- Polling by
merchantTransactionId(not available).
- Polling by
Always use the refund refundId for polling. Polling by merchantTransactionId is not supported and will result in API errors.
Status Definitionsβ
Unlinked refunds have simpler status transitions compared to split tender refunds since they process as a single operation: INITIATED β (optionally PENDING) β COMPLETED or FAILED.
See Unlinked Refunds β Status, Response & Error Reference for status definitions and the state/flow diagrams.
Error Handlingβ
For the complete list of error codes, status codes, and error details, see Refund Error Codes.
Unlinked RefundβSpecific Errorsβ
Beyond standard refund errors, unlinked refunds have these specific failure modes:
- CARD-only restriction: Payment method type must be CARD β ACH and bank accounts are rejected with
422 UNPROCESSABLE_ENTITY: Unlinked refunds are only supported for CARD payment methods. - Customer not found: Customer HSID does not exist in the system β
422 UNPROCESSABLE_ENTITY: Customer not found. - Payment method not associated: Payment method does not belong to the specified customer β
422 UNPROCESSABLE_ENTITY: Payment method not associated with customer. - Duplicate transaction: Same
merchantTransactionIdalready used for an unlinked refund β422 UNPROCESSABLE_ENTITY: Duplicate merchant transaction. - Amount exceeds limit: Refund amount exceeds $10,000 USD β
422 UNPROCESSABLE_ENTITY: Amount exceeds maximum allowed. - Invalid or expired card: Card is invalid, expired, or deleted β Stripe rejects with failure details.
Unlinked refunds go through strict two-layer validation (schema, then business rules) β see Validation Layers for the error codes per layer.
Webhooksβ
CCG sends one webhook per refund request β REFUND_SUCCESS, REFUND_FAILED, or (rarely) REFUND_PENDING. Subscribe to these events to get real-time refund outcomes without polling. Unlinked refund webhooks do not include a paymentId field since there's no associated payment.
See Unlinked Refunds β Status, Response & Error Reference for the complete event table and webhook payload fields.
Retry Handlingβ
Unlinked refunds do not support automatic retries. Each refund request is a distinct operation:
- Failed refund: If validation fails or processor rejects, merchant must handle manually:
- Fix validation errors (e.g., use correct CARD payment method) and resubmit with new
merchantTransactionId. - Verify customer and payment method association before retry.
- Check payment method status (active, not expired, not deleted).
- Fix validation errors (e.g., use correct CARD payment method) and resubmit with new
- Duplicate prevention: The same
merchantTransactionIdcannot be reused. A duplicate returns422; it does not replay the original refund. - Customer resolution: If customer not found, ensure customer exists in system before retry.
See Unlinked Refunds β Status, Response & Error Reference for the situation-by-situation recovery table and the uncertain-outcome procedure.
V1 vs V2 API Comparisonβ
Unlinked Refund is supported in both v1 and v2 APIs, but v2 provides enhanced validation and clearer error handling.
See Unlinked Refunds β Status, Response & Error Reference for the key differences and version-specific spec links.
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: Can I use unlinked refunds for ACH or bank accounts?
- No. Unlinked refunds are CARD-only. ACH and bank accounts are not supported and will be rejected with
422 UNPROCESSABLE_ENTITY.
Q: How do I correlate webhook events with refund records?
- Use the
refundIdormerchantTransactionIdin both the API response and webhook payload to match events.
Q: What if I don't receive a webhook?
- Poll
GET v2/refunds/{refundId}to get the current status. Check your endpoint logs and ensure it returns a2xxstatus. See Webhook Configuration.
Questions about customer requirements, duplicate refunds, and the $10,000 limit are answered in Unlinked Refunds β Status, Response & Error Reference.
Integration Checklistβ
- Merchant account is configured and has access to refund APIs
- API endpoints and authentication are set up
- Refund request uses
paymentMethodId(notpaymentId) for unlinked refunds - Customer object includes required fields:
firstName,lastName,hsid - Payment method is CARD type (not ACH or bank account)
- Customer and payment method are properly associated in system
- Each refund uses a unique
merchantTransactionId - Amount does not exceed $10,000 USD per refund
- Status polling uses
refundIdβ notmerchantTransactionId - Webhook endpoint is configured and returns
2xx - Webhook handler is idempotent and logs all payloads
- All error codes and validation failures are handled
- Integration tested with test cards and simulated failures