Vendor Configuration
The vendors filter that controls which processor/payment-method/channel combination your session exposes, and the client-safe vendorConfigs CCG returns.
The vendors filter gives you precise control over which payment processor, payment method types, and channels are available in a checkout session. When you create a V2 session, the platform resolves processor configuration from your merchant account and returns it in vendorConfigs β a client-safe snapshot your frontend uses to initialize the payment SDK and present the right payment options to your customers.
Vendor configuration is available on V2 sessions only (POST /v2/sessions). V1 sessions receive a subset of this behavior through legacy channel fields.
When you create a V2 checkout session, the platform resolves the payment processor configuration for your merchant account and attaches it to the session. This page describes how that configuration is scoped, what the response contains, what fields are safe to read client-side, and how the platform determines which processor handles a given transaction.
Integration Detailsβ
- Prerequisite: Merchant account onboarded to the CCG Platform with V2 session support. See Getting Started.
- API Endpoint:
POST /v2/sessionsβ creates a V2 checkout session with vendor configuration - API Spec: Create Session
- Scope:
merchant - Key Request Field:
config.vendorsβ optional array to restrict session to specific processors, payment method types, and channels - Key Response Field:
checkoutRequest.config.vendorConfigsβ resolved processor configuration; use to initialize the payment SDK - Error Handling: See Session Error Codes for session-specific errors
API Requestβ
For complete field definitions, constraints, and validations, refer to the OpenAPI Spec.
Include config.vendors in your V2 session request to restrict the session to a specific processor, payment method type, and set of channels. Omit config.vendors to use your full merchant configuration.
Sample Request β V2 Session with Vendor Configuration (Stripe, Card, Apple Pay + Webform)
curl -X POST "https://api-stg.uhg.com/api/financial/commerce/nonprodcheckout/v2/sessions" \
-H "Authorization: ******" \
-H "X-Merchant-Id: <merchant-id>" \
-H "X-Upstream-Env: dev" \
-H "Content-Type: application/json" \
-d '{
"customer": {
"firstName": "Jane",
"lastName": "Doe",
"email": "jane.doe@example.com",
"hsid": "<customer-hsid>"
},
"payment": {
"merchantTransactionId": "<unique-id>",
"amount": 1500,
"authorizeCard": false
},
"config": {
"modes": ["PAYMENT"],
"vendors": [
{
"vendor": "STRIPE",
"paymentMethods": [
{
"type": "CARD",
"channels": ["APPLE_PAY", "WEBFORM"]
}
]
}
]
}
}'
Sample Request β V2 Session without Vendor Filter (all configured processors)
curl -X POST "https://api-stg.uhg.com/api/financial/commerce/nonprodcheckout/v2/sessions" \
-H "Authorization: ******" \
-H "X-Merchant-Id: <merchant-id>" \
-H "Content-Type: application/json" \
-d '{
"customer": {
"firstName": "Jane",
"lastName": "Doe",
"email": "jane.doe@example.com",
"hsid": "<customer-hsid>"
},
"payment": {
"merchantTransactionId": "<unique-id>",
"amount": 1500,
"authorizeCard": false
},
"config": {
"modes": ["PAYMENT"]
}
}'
API Responseβ
Sample responses show key fields only. For the complete schema, refer to the OpenAPI Spec.
The checkoutRequest.config.vendorConfigs array in the response contains the resolved processor configuration for the session.
Sample Response β Session Created with Vendor Configuration (200)
{
"data": {
"checkoutSessionId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"hostedUrl": "https://walletprod.healthsafepay.com/wallet/v2/checkout?session=a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"url": "https://api-stg.uhg.com/api/financial/commerce/nonprodcheckout/v2/sessions/a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"checkoutRequest": {
"config": {
"vendorConfigs": [
{
"vendor": "STRIPE",
"vendorMerchantId": "acct_xxxxxxxxxxxx",
"clientConfig": {
"publicKey": "pk_live_xxxxxxxxxxxx"
},
"paymentMethods": [
{
"type": "CARD",
"channels": [
{ "type": "APPLE_PAY", "order": 0, "enabled": true },
{ "type": "WEBFORM", "order": 1, "enabled": true }
]
}
]
}
]
}
}
}
}
Sample Response β Session Created with No Matching Vendor (empty vendorConfigs)
{
"data": {
"checkoutSessionId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"checkoutRequest": {
"config": {
"vendorConfigs": []
}
}
}
}
Sample Response β Business Rule Violation (400 β missing vendor field)
{
"errors": [
{
"title": "INVALID_REQUEST",
"detail": "config.vendors[0].vendor is required",
"status": "400"
}
]
}
Status Handlingβ
Vendor configuration is resolved and embedded in vendorConfigs at session creation time. No additional polling is needed to retrieve vendor configuration β it is available in the create-session response. vendorConfigs is available once the session reaches CREATED.
See Create a Session for the polling/callback approach, and Session Lifecycle for the full status table.
Error Handlingβ
For session-specific error codes and remediation steps, see Session Error Codes.
Common errors related to vendor configuration:
| Error Title | HTTP Status | Cause | Action |
|---|---|---|---|
INVALID_REQUEST | 400 | vendor field missing from a vendors entry, or unrecognized enum value | Verify config.vendors entries include a valid vendor value |
UNAUTHORIZED | 401 | Invalid or expired JWT token | Refresh your token and retry |
MERCHANT_NOT_FOUND | 404 | X-Merchant-Id does not match an active merchant | Verify merchant onboarding is complete |
If vendorConfigs is empty or absent in a successful (200) response, it is not an error β see When vendorConfigs Is Absent or Empty.
The vendors Filterβ
The optional config.vendors array lets you restrict a session to a specific processor, payment method type, and set of channels. When omitted, the platform uses your full merchant configuration.
{
"config": {
"modes": ["PAYMENT"],
"vendors": [
{
"vendor": "STRIPE",
"paymentMethods": [
{
"type": "CARD",
"channels": ["APPLE_PAY", "WEBFORM"]
}
]
}
]
}
}
See Vendor Configuration β Scoping, Client Fields & Routing Reference for the supported inputs table, scoping behavior table, WEBFORM default rules, the full vendorConfigs response shape and client-safe field list, and how deterministic processor routing works.
Your integration should always handle the case where vendorConfigs is empty or absent β see Client Behavior When Configuration Is Absent.
FAQβ
Q: What happens if I specify a vendor that is not configured on my account?
A: The session is created successfully, but that vendor is silently excluded from vendorConfigs. No error is returned. Always verify vendorConfigs in the response before initializing the payment SDK.
Q: What should I do if clientConfig.publicKey is missing?
A: Do not attempt to initialize the payment SDK. This indicates a configuration issue with your merchant account. Contact your onboarding or support team.
Questions about vendorConfigs vs paymentMethodChannel, multiple processors, and whether the processor can change after session creation are answered in Vendor Configuration β Scoping, Client Fields & Routing Reference.
Integration Checklistβ
- Merchant account onboarded to the CCG Platform with V2 session support
- Session creation always performed server-side (JWT never exposed to browser)
-
config.vendorsentries each include a validvendorvalue; omit the array to use all configured processors -
vendorConfigspresence and content verified in the response before initializing the payment SDK - Client code handles
vendorConfigsbeing absent or empty (legacy account or unmatched filter) -
clientConfig.publicKeychecked for presence before passing to the payment SDK - Payment SDK initialized using
vendorMerchantIdandclientConfig.publicKeyfromvendorConfigs - Processor routing understood β processor is resolved at session creation and does not change
- Error handling implemented for
400 INVALID_REQUESTwhenconfig.vendorscontains invalid entries - Tested with sandbox/staging environment before going live
Related Documentationβ
- Vendor Configuration β Scoping, Client Fields & Routing Reference
- Create a Session β Session creation, lifecycle, and status handling
- Session Error Codes β Full error reference for session endpoints
- OpenAPI Spec β Complete field definitions and constraints for V2 session creation
- Widget Capabilities β Mode support matrix and configuration details
- Getting Started β Merchant onboarding and prerequisites