Checking access…

Skip to main content
Audience: CCG Platform Engineers

Single Payment β€” Reference

Looking up a single-payment validation rule, error response shape, the PAYMENT_SUCCEEDED webhook payload, or an edge case's expected behavior. For the conceptual model, see Single Payment Flow. For the request/response walkthrough, see How to Create a Single Payment.

Validation Rules​

RuleHTTP StatusError
paymentAllocations array must have exactly 1 item (single payment)400INVALID_REQUEST
paymentAllocations[0].amount must equal top-level amount400INVALID_REQUEST
amount must be β‰₯ 1 and ≀ 100,000,000400INVALID_REQUEST
merchantTransactionId must be 1-50 characters400INVALID_REQUEST
Each allocation must have either paymentMethodId OR paymentMethod, not both400INVALID_REQUEST
authorizeCard: true requires partialAuthorization: true400INVALID_REQUEST
Customer must have at least one identifier (hsid, enterpriseIdentifier, or metadata)400INVALID_REQUEST

Error Scenarios​

400 β€” Bad Request (Schema Validation)​

{
"title": "INVALID_REQUEST",
"status": 400,
"detail": "Invalid request format. Please check JSON structure and field types"
}

403 β€” Forbidden (Merchant Not Linked)​

{
"title": "FORBIDDEN",
"status": 403,
"detail": "403 FORBIDDEN. RequestId: abc123-def456"
}

422 β€” Unprocessable Entity (Payment Failed)​

{
"title": "PAYMENT_ERROR",
"status": 422,
"detail": "Payment processing failed for all records. Check individual records for error details",
"data": {
"id": "550e8400-e29b-41d4-a716-446655440000",
"merchantTransactionId": "order-20260404-001",
"amount": 15000,
"status": "FAILED",
"paymentAllocations": [
{
"id": "a1b2c3d4-e5f6-7890-1234-567890abcdef",
"amount": 15000,
"status": "FAILED",
"error": {
"code": "card_declined",
"message": "Your card was declined."
}
}
]
}
}

Webhook Payload β€” PAYMENT_SUCCEEDED​

{
"name": "PAYMENT_SUCCEEDED",
"source": "merchant-portal",
"payload": {
"id": "550e8400-e29b-41d4-a716-446655440000",
"merchantTransactionId": "order-20260404-001",
"amount": 15000,
"currencyCode": "USD",
"status": "COMPLETED",
"customer": {
"firstName": "John",
"lastName": "Doe",
"email": "john.doe@example.com"
},
"paymentAllocations": [
{
"id": "a1b2c3d4-e5f6-7890-1234-567890abcdef",
"amount": 15000,
"status": "COMPLETED",
"paymentMethod": {
"type": "CARD",
"card": {
"lastFour": "4242",
"brand": "visa"
}
}
}
],
"paymentDateUtc": "2026-04-04T10:30:00Z"
}
}

Edge Cases​

ScenarioBehaviorNotes
Duplicate merchantTransactionId (retry ≀ 5)Returns existing payment with current statusNo new processing; idempotent response
Duplicate merchantTransactionId (retry > 5)422 UNPROCESSABLE_ENTITYMerchant must generate a new ID
Stripe timeoutAllocation marked FAILED, payment marked FAILEDCircuit breaker may open if repeated
Customer not foundPayment transitions to PENDING_FOR_CUSTOMER_CREATION then FAILEDError logged with resolution details
Invalid paymentMethodId422 UNPROCESSABLE_ENTITYPM must exist in customer's wallet
Expired card422 PAYMENT_ERROR with vendor errorAllocation error contains decline reason