Issue a Refund
Refunding a payment β single-allocation (one card) or split tender (two cards, full or partial against either one), with each card processed independently.
Both use the same Create Refund and Get Refund operations β the only difference is how many refundAllocations[] entries the request has. This guide covers how to initiate refunds, monitor status, and handle errors and webhook notifications for both.
Business Context: For business context, eligibility, scenarios see Split Tender Refunds β Business Document.
- API Endpoint:
POST v2/refundsβ create a 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 refund scenarios. See Test Cards
- β οΈ Error Handling: See Refund Error Codes for error codes and resolution steps
Single Allocation Refundsβ
Refund a payment that charged one card β in full or for a partial amount.
- Full refund: Include
paymentId, omitrefundAllocations. CCG refunds the entire captured amount. - Partial refund: Include
paymentIdand exactly onerefundAllocations[]item with thepaymentAllocationIdandamountto refund. - No
PARTIAL_SUCCESS: With only one allocation, the refund either fully succeeds or fails β there's nothing to partially roll up.
Sample Request β Full refund (no allocations)
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",
"paymentId": "3222ac8a-c8fa-4426-bd99-e96a909569b0",
"merchantTransactionId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
}'
Sample Request β Partial refund (one allocation)
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",
"paymentId": "3222ac8a-c8fa-4426-bd99-e96a909569b0",
"merchantTransactionId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"refundAllocations": [
{
"paymentAllocationId": "8cd647c5-f9ff-42a0-b7d9-084c7f5d7d47",
"amount": 500
}
]
}'
Poll GET v2/refunds/{refundId} until the status settles to COMPLETED or FAILED β see Payment β Status & Response Reference for how the original payment's status is unaffected while the refund is pending. For the exact response shape, see Issue a Refund β Status & Response Reference.
Split Tender Refundsβ
Split Tender Refund allows merchants to refund a split tender transaction β either in full across both cards, or partially against a specific card. Each card refund is processed independently.
- Refund model: Full Refund and Per-payment allocation β each allocation is refunded independently
- Partial refunds: Supported per card; merchant must specify card and amount
- No rollback on partial failure: Unlike card + card payments, if one card refund fails, the other is not reversed β result is
PARTIAL_SUCCESS - Status: Rolled up from both card refund statuses
When to Useβ
Use Split Tender Refund when:
- The original payment was a split tender transaction (two cards charged)
- A full refund is needed β both cards should be refunded for their original amounts
- A partial refund is needed β a specific card should be refunded for a specific amount
- A subsequent refund is needed after a previous partial refund on the same transaction
Note: Each refund allocation is processed independently. If one card fails (e.g., expired or disputed), the other card's refund still proceeds, resulting in
PARTIAL_SUCCESS. Unlike card + card payments, there is no automatic rollback.
π InternalNot visible in the public site
Refund processing flow, webhook status mapping, and Stripe processor considerations have moved to Engineering Guide β Split Tender Refunds β Processing.
API Requestβ
API Specification: Create Refund Β· Get Refund
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",
"paymentId": "620bba81-10d1-4abc-9e4a-c2c1752da349",
"merchantTransactionId": "28402815-8048-4725-b092-809f5fd28470",
"refundAllocations": [
{
"paymentAllocationId": "1ff243ca-e0f3-436f-a5b2-53c205715619",
"amount": 1000
},
{
"paymentAllocationId": "37cf8ca3-4e54-4599-ab36-2c9fd2ad42f4",
"amount": 100
}
]
}'
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, PARTIAL_SUCCESS, 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β
The refundAllocations array contains one entry per card, each with its own status and error details if failed. The parent refund status is computed from both allocations β COMPLETED if both succeed, FAILED if both fail, or PARTIAL_SUCCESS if one succeeds and one fails (no rollback).
Full response catalog: For the exact JSON shape of COMPLETED, PARTIAL_SUCCESS, and FAILED responses, see Split Tender Refund β Status, Response & Error Reference.
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, PARTIAL_SUCCESS, or FAILED).
- β
Supported:
- Poll the parent refund using
refundIdonly. - Get real-time status for all allocations in a single response.
- See per-card error details when a card refund fails.
- Poll the parent refund using
- β Not Supported:
- Polling by
merchantTransactionId(not available). - Polling individual allocation (child) refund IDs.
- Component-level webhook subscriptions per card.
- Polling by
Always use the parent refund refundId for polling. Polling by merchantTransactionId or allocation IDs is not supported and will result in API errors.
Both the parent refund and each allocation (card) carry their own status, and the parent status is computed from both allocation outcomes β PARTIAL_SUCCESS means one card succeeded and one failed, with no rollback of the successful one.
Full status definitions, mapping table, and lifecycle diagrams: See Split Tender Refund β Status, Response & Error Reference for the complete status tables and state/flow diagrams.
Error Handlingβ
Error Code Reference: For the complete list of error codes, status codes, and error details, see Refund Error Codes.
Split TenderβSpecific Errorsβ
Beyond standard refund errors, split tender refunds have these specific failure modes:
- Partial failure β no rollback: Unlike card + card payments, if one card refund fails, the other card's refund is not rolled back. The result is
PARTIAL_SUCCESSand the merchant must resolve the failed allocation separately. - Already refunded: If a
paymentAllocationIdhas already been fully refunded, the allocation returnsREFUND_ERROR: This payment is already refunded. - Expired or closed card: Refunds to expired or closed cards fail at the processor level β the other card's refund still proceeds, resulting in
PARTIAL_SUCCESS.
Webhooksβ
CCG sends one webhook per refund request β not per card: REFUND_SUCCESS, REFUND_PARTIAL_SUCCESS, or REFUND_FAILED. Subscribe to these events to get real-time refund outcomes without polling.
Full event table: See Split Tender Refund β Status, Response & Error Reference for the complete event table.
Retry Handlingβ
Split tender refunds do not support retries in the same way as payments. Each refund request is a distinct operation, identified by a unique merchantTransactionId β reusing one returns 422. A PARTIAL_SUCCESS failed allocation is not retried automatically; submit a new refund request for just that paymentAllocationId, or issue an unlinked/manual refund if the card is expired, closed, or disputed.
Recover a split-tender refundβ
| Situation | Action |
|---|---|
| Card expired or closed | Issue an unlinked refund or arrange a manual credit outside CCG. |
| Card disputed | Refund the undisputed allocation only; contact support about the disputed card. |
| Transient processor error | Submit a new refund for only the failed allocation, using a new merchantTransactionId. |
| Allocation already refunded | Adjust the request to the remaining refundable amount. |
If a refund request times out, do not submit it again until you confirm the original outcome:
- If the response included a
refundId, retrieve it withGET /v2/refunds/{refundId}. - If no
refundIdwas received, contact your 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 confirming the original outcome. Use a new unique
merchantTransactionIdfor a new request.
V1 vs V2 API Comparisonβ
Split Tender Refund is a new capability in v2 that extends the single-payment refund model.
Downloadable field-by-field comparison: See Split Tender Refund β Status, Response & Error Reference for the comparison workbook and version-specific spec links.
Backward Compatibilityβ
During v1 to v2 migration, CCG supports cross-version refund operations so v2 refund endpoints can continue to operate on eligible v1-origin payment resources.
- Supported operations:
POST /v2/refundscan create refunds against eligible v1-origin payments, andGET /v2/refunds/{refundId}can retrieve those refunds. - v1 baseline: In v1, split payments are not supported; refunds are tied to single-allocation payments.
- v2 normalization: When a v1-origin refund is returned via v2 APIs, CCG normalizes it into v2 shape with a single
refundAllocations[]entry. - Webhook behavior: During parallel use, webhook shape follows the resource version; after full v2 migration, webhooks are delivered in v2 shape.
- Behavior and safety: Refund processing remains allocation-independent, and partial failures surface as
PARTIAL_SUCCESS(no rollback of successful refund allocations).
For complete behavior, rollout controls, and migration flow, see Split Tender Backward Compatibility.
FAQβ
Q: How do I refund only one card in a split tender transaction?
- Specify the
paymentAllocationIdof the card to refund along with theamountinrefundAllocations. Omit the other allocation.
Q: What happens if one card refund fails?
- The other card's refund still proceeds. The result is
PARTIAL_SUCCESSβ unlike card + card payments, there is no rollback. Handle the failed allocation manually.
More FAQs: Questions about full refunds without allocations, polling individual allocation status, and when a status is final are answered in Split Tender Refund β Status, Response & Error Reference.
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.
Integration Checklistβ
- Merchant account is configured for split tender payments
- API endpoints and authentication are set up
- Refund request specifies correct
paymentIdandmerchantTransactionId - For partial refunds:
refundAllocationsincludespaymentAllocationIdandamount - Status polling uses parent
refundIdβ not allocation IDs -
PARTIAL_SUCCESShandling is implemented (manual resolution for failed card) - Webhook endpoint is configured and returns
2xx - Webhook handler is idempotent and logs all payloads
- All error codes and
PARTIAL_SUCCESSscenarios are handled - Integration tested with test cards and simulated partial failures