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β
| Rule | HTTP Status | Error |
|---|---|---|
paymentAllocations array must have exactly 1 item (single payment) | 400 | INVALID_REQUEST |
paymentAllocations[0].amount must equal top-level amount | 400 | INVALID_REQUEST |
amount must be β₯ 1 and β€ 100,000,000 | 400 | INVALID_REQUEST |
merchantTransactionId must be 1-50 characters | 400 | INVALID_REQUEST |
Each allocation must have either paymentMethodId OR paymentMethod, not both | 400 | INVALID_REQUEST |
authorizeCard: true requires partialAuthorization: true | 400 | INVALID_REQUEST |
Customer must have at least one identifier (hsid, enterpriseIdentifier, or metadata) | 400 | INVALID_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β
| Scenario | Behavior | Notes |
|---|---|---|
Duplicate merchantTransactionId (retry β€ 5) | Returns existing payment with current status | No new processing; idempotent response |
Duplicate merchantTransactionId (retry > 5) | 422 UNPROCESSABLE_ENTITY | Merchant must generate a new ID |
| Stripe timeout | Allocation marked FAILED, payment marked FAILED | Circuit breaker may open if repeated |
| Customer not found | Payment transitions to PENDING_FOR_CUSTOMER_CREATION then FAILED | Error logged with resolution details |
Invalid paymentMethodId | 422 UNPROCESSABLE_ENTITY | PM must exist in customer's wallet |
| Expired card | 422 PAYMENT_ERROR with vendor error | Allocation error contains decline reason |