Checking access…

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

Look Up a Payment

When to use this page

You need the current status or details of a payment, and you have either its paymentId or your own merchantTransactionId. If you only have the sessionId, use Look Up a Session.

Choose the lookup​

You haveCallReturns
paymentIdGET /v2/payments/{paymentId} (spec)The payment
merchantTransactionIdGET /v2/payments?merchantTransactionId={id} (spec)The payment for that transaction ID
sessionId onlyGET /v2/sessions/{sessionId}The session, including its payment

Both payment lookups use the merchant scope and the same headers: Authorization, X-Merchant-Id, and X-Upstream-Env in non-production. See API Headers.

Use merchantTransactionId to find a payment when you lost the paymentId, or to reconcile against your own order records. It is limited to 50 characters.

Requests​

# By paymentId
curl -X GET "https://api-stg.uhg.com/api/financial/commerce/nonprodcheckout/v2/payments/3222ac8a-c8fa-4426-bd99-e96a909569b0" \
-H "Authorization: Bearer <token>" \
-H "X-Merchant-Id: <merchant-id>" \
-H "X-Upstream-Env: dev"

# By merchantTransactionId
curl -X GET "https://api-stg.uhg.com/api/financial/commerce/nonprodcheckout/v2/payments?merchantTransactionId=30d279fa-9d7d-48c9-8e61-c3783eecf18c" \
-H "Authorization: Bearer <token>" \
-H "X-Merchant-Id: <merchant-id>" \
-H "X-Upstream-Env: dev"

Read the result​

Both calls return the same payment object, so the response and status rules are identical.

HTTPMeaningWhat to do
200The payment resolved to a final or stable stateRead status and paymentAllocations[]
202The payment is still processingKeep polling, or wait for the webhook
207Mixed outcome across allocations, for example HSA PARTIAL_SUCCESSRead each allocation; see HSA mixed outcomes

Always read status in the body, not only the HTTP code. Field definitions, the status mapping, and sample responses for single-allocation and split-tender payments are in Payment β€” Status & Response Reference.

Sample Response β€” COMPLETED (200)

Key fields only. See the Get Payment API Spec for the complete response.

{
"url": "https://api-stg.uhg.com/api/financial/commerce/nonprodcheckout/v2/payments/3222ac8a-c8fa-4426-bd99-e96a909569b0",
"data": {
"id": "3222ac8a-c8fa-4426-bd99-e96a909569b0",
"merchantTransactionId": "30d279fa-9d7d-48c9-8e61-c3783eecf18c",
"amount": 100,
"currencyCode": "USD",
"status": "COMPLETED",
"paymentAllocations": [
{ "id": "8cd647c5-f9ff-42a0-b7d9-084c7f5d7d47", "amount": 100, "status": "COMPLETED" }
]
}
}

Poll or use webhooks​

Prefer payment webhooks for status changes, and use these lookups to confirm the current status before acting on a webhook, to recover after a missed event, or to reconcile. If you poll, stop once the status is final: COMPLETED, FAILED, or CANCELED. A card pre-authorization stays AUTHORIZED until you capture or cancel it, and an ACH payment can stay ACCEPTED while settlement is pending.

When a payment fails​

CCG supports one attempt plus four retries for the same merchantTransactionId. Looking a payment up by merchantTransactionId tells you where you are in that sequence before you try again. For how to retry, see Handle Retries in Your Integration, and for the rules behind it, How Retry Logic Works.

Errors​

HTTPMeaningAction
400Invalid paymentId or missing merchantTransactionIdCheck the identifier format
401Invalid or expired tokenRefresh the token
403The merchant is not allowed to read this paymentCheck X-Merchant-Id and the merchant scope
404No payment foundCheck the ID and the environment
422The request could not be processedCheck the values against the spec

See Payment Error Codes for the full list.