Checking access…

Skip to main content
Audience: CCG Platform Engineers

How to Create a Single Payment

Platform engineers implementing or debugging the actual single-payment request/response cycle β€” request shapes and the resulting payload. For the conceptual model (what a single-allocation payment is, when to use it), see Single Payment Flow. For validation rules, errors, and the webhook payload, see Single Payment β€” Reference.

API Request​

info

For complete field definitions and constraints, see the Create Payment API Spec.

Pay with Wallet (Stored Payment Method)​

Uses paymentMethodId to reference a card already stored in the customer's wallet.

Sample Request
curl -X POST "https://api-stg.uhg.com/api/financial/commerce/nonprodcheckout/v2/payments" \
-H "Authorization: Bearer <token>" \
-H "X-Merchant-Id: b955db5e-aef2-47de-bbb9-c80b9cc16e8f" \
-H "X-Upstream-Env: dev" \
-H "Content-Type: application/json" \
-d '{
"merchantTransactionId": "order-20260404-001",
"amount": 15000,
"currencyCode": "USD",
"authorizeCard": false,
"partialAuthorization": false,
"description": "Payment for order #12345",
"statementDescriptorSuffix": "ORDER123",
"customer": {
"hsid": "b313c1d1-b5b6-4ec7-8b5a-3a9cf7755060",
"firstName": "John",
"lastName": "Doe",
"email": "john.doe@example.com"
},
"paymentAllocations": [
{
"amount": 15000,
"paymentMethodId": "b0b3c48d-4cf6-404a-a554-e14640a51c5b"
}
],
"metadata": {
"orderId": "12345",
"channel": "web"
}
}'

One-Time Pay (Inline Payment Method)​

Provides payment method details inline β€” the method is not saved to the wallet.

Sample Request
curl -X POST "https://api-stg.uhg.com/api/financial/commerce/nonprodcheckout/v2/payments" \
-H "Authorization: Bearer <token>" \
-H "X-Merchant-Id: b955db5e-aef2-47de-bbb9-c80b9cc16e8f" \
-H "X-Upstream-Env: dev" \
-H "Content-Type: application/json" \
-d '{
"merchantTransactionId": "order-20260404-002",
"amount": 5000,
"currencyCode": "USD",
"authorizeCard": false,
"partialAuthorization": false,
"customer": {
"enterpriseIdentifier": "123456789"
},
"paymentAllocations": [
{
"amount": 5000,
"paymentMethod": {
"type": "CARD",
"card": {
"number": "4242424242424242",
"expMonth": 12,
"expYear": 2028,
"cvc": "123"
}
}
}
]
}'

API Response​

202 Accepted (Immediate Response)​

The service returns 202 immediately with the payment in INITIATED or PENDING state.

{
"url": "https://api-stg.uhg.com/api/financial/commerce/nonprodcheckout/v2/payments/550e8400-e29b-41d4-a716-446655440000",
"data": {
"id": "550e8400-e29b-41d4-a716-446655440000",
"merchantTransactionId": "order-20260404-001",
"amount": 15000,
"currencyCode": "USD",
"status": "INITIATED",
"authorizeCard": false,
"authRequired": false,
"partialAuthorization": false,
"statementDescriptorSuffix": "ORDER123",
"description": "Payment for order #12345",
"customer": {
"firstName": "John",
"lastName": "Doe",
"email": "john.doe@example.com",
"hsid": "b313c1d1-b5b6-4ec7-8b5a-3a9cf7755060"
},
"paymentAllocations": null,
"paymentDateUtc": "2026-04-04T10:30:00Z",
"metadata": {
"orderId": "12345",
"channel": "web"
}
}
}

200 OK β€” Completed Payment (GET)​

After processing completes, a GET /v2/payments/{paymentId} returns the full result:

{
"url": "https://api-stg.uhg.com/api/financial/commerce/nonprodcheckout/v2/payments/550e8400-e29b-41d4-a716-446655440000",
"data": {
"id": "550e8400-e29b-41d4-a716-446655440000",
"merchantTransactionId": "order-20260404-001",
"amount": 15000,
"authorizedAmount": 15000,
"capturedAmount": 15000,
"currencyCode": "USD",
"status": "COMPLETED",
"authorizeCard": false,
"authRequired": false,
"partialAuthorization": false,
"statementDescriptorSuffix": "ORDER123",
"description": "Payment for order #12345",
"customer": {
"firstName": "John",
"lastName": "Doe",
"email": "john.doe@example.com",
"hsid": "b313c1d1-b5b6-4ec7-8b5a-3a9cf7755060"
},
"paymentAllocations": [
{
"id": "a1b2c3d4-e5f6-7890-1234-567890abcdef",
"amount": 15000,
"authorizedAmount": 15000,
"capturedAmount": 15000,
"status": "COMPLETED",
"paymentMethod": {
"id": "b0b3c48d-4cf6-404a-a554-e14640a51c5b",
"type": "CARD",
"card": {
"lastFour": "4242",
"brand": "visa",
"expMonth": 12,
"expYear": 2028
}
},
"vendor": {
"name": "STRIPE",
"transactionId": "pi_3NabcXYZ123456789"
}
}
],
"paymentDateUtc": "2026-04-04T10:30:00Z",
"metadata": {
"orderId": "12345",
"channel": "web"
},
"merchant": {
"id": "b955db5e-aef2-47de-bbb9-c80b9cc16e8f",
"name": "Example Merchant"
}
}
}