How to Confirm a Payment Allocation (3DS)
Platform engineers implementing or debugging the actual confirm request/response cycle. For the conceptual model (when this is called, the processing flow), see Confirming a Payment Allocation (3DS). For validation order, status tables, and error scenarios, see Confirm Allocation β Reference.
- API Endpoint:
PATCH /v2/payments/{paymentId}/allocations/{allocationId}/confirm - API Spec: Confirm Payment Allocation
- Scopes: Production:
financial/commerce/checkout:user; non-production:financial/commerce/nonprodcheckout:user - API Version: v2
- Required Headers:
Authorization,X-Merchant-Id(UUID),X-Checkout-Id(UUID), andX-Upstream-Envin non-production.X-Sourceis optional. - Request Body: None
- Response:
202 Acceptedβ updated transaction with the confirmed allocation inCONFIRMATION_INITIALIZED
API Requestβ
Path Parametersβ
| Parameter | Type | Description |
|---|---|---|
paymentId | UUID | The V2 transaction ID (id from the create payment response) |
allocationId | UUID | The specific allocation ID (paymentAllocations[n].id) to confirm |
Required Headersβ
| Header | Type | Description |
|---|---|---|
Authorization | string | Bearer token |
X-Merchant-Id | UUID | Merchant identifier β must match the merchant that owns the transaction |
X-Checkout-Id | UUID | Checkout session ID β must match the checkout session under which the payment was created |
Request Bodyβ
None β this is a PATCH with no body.
Sample Request
curl -X PATCH "https://api-stg.uhg.com/api/financial/commerce/nonprodcheckout/v2/payments/{paymentId}/allocations/{allocationId}/confirm" \
-H "Authorization: Bearer <token>" \
-H "X-Merchant-Id: b955db5e-aef2-47de-bbb9-c80b9cc16e8f" \
-H "X-Checkout-Id: f3a1c2d4-e5f6-7890-ab12-cd34ef567890" \
-H "X-Upstream-Env: dev" \
-H "Accept: application/json"
Each allocation requires its own PATCH call β when both legs of a split-tender payment need confirming, call this endpoint once per allocationId.
API Responseβ
Success β 202 Acceptedβ
Returns the full updated transaction. The confirmed allocation transitions to CONFIRMATION_INITIALIZED. The transaction-level status reflects the combined state of all allocations.
The complex object is trimmed for brevity. Refer to the API Spec for the full response structure.
Sample Response β Allocation CONFIRMATION_INITIALIZED
{
"url": "https://api-stg.uhg.com/v2/payments/3222ac8a-c8fa-4426-bd99-e96a909569b0",
"data": {
"id": "3222ac8a-c8fa-4426-bd99-e96a909569b0",
"merchantTransactionId": "c407ecc7-25f0-4fd9-844b-e9baca53707a",
"amount": 100,
"status": "AUTH_REQUIRED",
"paymentAllocations": [
{
"id": "8cd647c5-f9ff-42a0-b7d9-084c7f5d7d47",
"amount": 60,
"status": "CONFIRMATION_INITIALIZED",
"paymentMethod": {
"// ... see API Spec for full paymentMethod object ...": "..."
}
},
{
"id": "777373ac-dccf-499f-8c77-1d5e198508ad",
"amount": 40,
"status": "AUTH_REQUIRED",
"paymentMethod": {
"// ... see API Spec for full paymentMethod object ...": "..."
}
}
]
}
}
Sample Response β Validation Failure (422)
{
"title": "UNPROCESSABLE_ENTITY",
"detail": "Payment cannot be confirmed",
"status": 422
}
After confirming an allocation, track the overall transaction status by polling GET /v2/payments/{paymentId} or listening to webhooks β see Confirm Allocation β Reference for the status progression and mapping tables.