Checking access…

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

Single Payments API

When to use this page

The standard one-card payment flow β€” no rollback logic needed since there's only one allocation; idempotent up to 5 retries.

A single allocation payment charges one card for the full transaction amount. This is the standard payment flow β€” the paymentAllocations array contains exactly one entry. There is no rollback logic since only one card is involved.

  • Processing: One card charged for the full amount
  • No rollback: Only one allocation β€” nothing to roll back
  • Idempotent: Same merchantTransactionId can be retried up to 5 times
Business Context

For business rules and lifecycle details, see the Payments β€” Business Guide.


Integration Details

How It Differs from Multi-Allocation (Split Tender)​

AspectSingle AllocationMulti-Allocation (Split Tender)
Cards12
paymentAllocations1 entryExactly 2 entries
RollbackN/A β€” nothing to roll backAutomatic β€” successful card cancelled if other fails
ROLLED_BACK statusNeverYes, on the cancelled allocation
remediation objectNever presentPresent on rolled-back allocation
Retry scopeRetry the single cardAll-or-nothing β€” both allocations retried together
WebhookPAYMENT_SUCCEEDED or PAYMENT_FAILEDSame events, but payload includes per-allocation status

For multi-allocation (split tender) integration, see Multi-Allocation Payments.


API Request​

API Specification

For complete field definitions, constraints, and validations, refer to the Create Payment API Spec.

Stored Payment Method (v2/payments)​

Submit a single allocation payment using a saved card. The paymentAllocations array contains exactly 1 entry with the paymentMethodId and the full amount.

Sample Request β€” Single Allocation
curl -X POST "https://api-stg.uhg.com/api/financial/commerce/nonprodcheckout/v2/payments" \
-H "Authorization: <token>" \
-H "X-Merchant-Id: b955db5e-aef2-47de-bbb9-c80b9cc16e8f" \
-H "X-Upstream-Env: dev" \
-H "Accept: */*" \
-H "Content-Type: application/json" \
-d '{
"merchantTransactionId": "c407ecc7-25f0-4fd9-844b-e9baca53707a",
"amount": 100,
"authorizeCard": false,
"customer": {
"hsid": "b313c1d1-b5b6-4ec7-8b5a-3a9cf7755060",
"metadata": {}
},
"metadata": null,
"paymentAllocations": [
{
"paymentMethodId": "7b30960f-8a19-4ae0-8d73-46849365f81d",
"amount": 100
}
]
}'

Session-Based (v2/sessions)​

For widget-based (v3) flows, the customer selects a card through the PAYMENT_WITH_WALLET UI. Refer to the Widget Integration Guide for session setup.


API Response​

A successful response mirrors the single allocation's status directly at the parent level β€” no remediation object is ever present since there's nothing to roll back.

Full response catalog

For the exact JSON shape of successful and failed responses, see Single Payment β€” Status & Response Reference.


Status Handling​

Polling Guidelines​

  • βœ… Supported:
    • Poll the parent transaction using paymentId or merchantTransactionId.
    • Get the allocation status in a single response.
  • ❌ Not Supported:
    • Polling individual allocation (child) payment IDs.
warning

Always use the parent transaction identifier for polling. Using child payment IDs will result in API errors.

Status mapping table

See Single Payment β€” Status & Response Reference for the full allocation-to-parent status mapping.


Error Handling​

Error Code Reference

For the complete list of error codes, status codes, and error details, see Payment Error Codes.

  • Card declined: The error object in the allocation contains the processor decline reason and error code.
  • Business rule violations: The response may not include a paymentAllocations array β€” the error is at the top level.
  • No rollback errors: Since only one card is involved, there are no remediation objects or rollback-related errors.

Retry Handling​

Single allocation payments follow the same retry logic as multi-allocation:

  • Up to 5 attempts per merchantTransactionId (1 initial + 4 retries).
  • Only retry if the parent payment status is FAILED.
  • All retries must use the same merchantTransactionId.
  • On retry, you may change the card or keep the same one.
  • After the 5th failure, no further retries are allowed for that merchantTransactionId.

Webhooks​

CCG emits one webhook per transaction β€” PAYMENT_SUCCEEDED or PAYMENT_FAILED. Subscribe to these events for real-time status updates. PAYMENT_FAILED is not final if retries remain.

To configure webhooks, see the Configuration Guide.

Full event table

See Single Payment β€” Status & Response Reference for the complete event table.


FAQ​

Q: How is this different from a multi-allocation (split tender) payment?

  • Single allocation uses one card. There is no rollback, no ROLLED_BACK status, and no remediation object. See the comparison table above.

Q: Can I use the same merchantTransactionId to retry with a different card?

  • Yes. On retry, you may change the paymentMethodId and amount.
More FAQs

Questions about PARTIAL_SUCCESS/ROLLED_BACK statuses and polling individual allocation IDs are answered in Single Payment β€” Status & Response Reference.


Integration Checklist​

  • API endpoints and authentication are set up
  • Payment request includes exactly one paymentAllocation with the correct amount
  • Error handling logic is implemented for card declines and business rule violations
  • Webhook endpoint is configured and returns 2xx
  • Webhook handler is idempotent and logs all payloads
  • Retry logic follows documented rules (max 5 attempts)
  • All error codes are handled
  • Integration tested with test cards and simulated failures