Checking access…

Skip to main content
Version: v2
Audience: Consumers, CCG Platform Engineers

Unlinked Refunds API

When to use this page

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 paymentId and 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.

Business Context

For business context, eligibility, scenarios see Unlinked Refunds β€” Business Document.


Integration Details
  • API Endpoint:
    • POST v2/refunds β€” create an unlinked refund
    • GET v2/refunds/{refundId} β€” poll refund status
  • Scope: All operations are at the merchant scope.
  • 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​

API Specification
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​

FieldRequiredTypeDescription
amountYesNumberRefund amount in cents (e.g., 5000 = $50.00). Must not exceed $10,000 USD (1000000).
reasonYesStringReason code (e.g., DUPLICATE, FRAUDULENT, REQUESTED_BY_CUSTOMER)
paymentMethodIdYesUUIDPayment method to be credited (must be CARD type)
merchantTransactionIdYesUUIDUnique identifier for this refund request. Reuse returns 422; it is not a replay key
customerYesObjectCustomer information for validation
customer.firstNameYesStringCustomer first name
customer.lastNameYesStringCustomer last name
customer.hsidYesStringCustomer HSID identifier (primary identifier)
customer.metadataNoObjectAdditional customer metadata
Important
  • paymentId must be absent or null for unlinked refunds
  • If both paymentId and paymentMethodId are 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.

Full response catalog

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 refundId only.
    • Get real-time status in a single response.
    • See error details when refund fails.
  • ❌ Not Supported:
    • Polling by merchantTransactionId (not available).
warning

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.

Full status table and lifecycle diagrams

See Unlinked Refunds β€” Status, Response & Error Reference for status definitions and the state/flow diagrams.


Error Handling​

Error Code Reference

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 merchantTransactionId already 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.

Full event table and payload fields

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).
  • Duplicate prevention: The same merchantTransactionId cannot be reused. A duplicate returns 422; it does not replay the original refund.
  • Customer resolution: If customer not found, ensure customer exists in system before retry.
Full recovery steps

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.

Full comparison table

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 paymentId and reverse a specific charge. Unlinked refunds use paymentMethodId and 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 refundId or merchantTransactionId in 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 a 2xx status. See Webhook Configuration.
More FAQs

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 (not paymentId) 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 β€” not merchantTransactionId
  • 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