Checking access…

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

Vendor Configuration

When to use this page

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.


V2 Feature

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​

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​

API Specification

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​

Response Structure

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 TitleHTTP StatusCauseAction
INVALID_REQUEST400vendor field missing from a vendors entry, or unrecognized enum valueVerify config.vendors entries include a valid vendor value
UNAUTHORIZED401Invalid or expired JWT tokenRefresh your token and retry
MERCHANT_NOT_FOUND404X-Merchant-Id does not match an active merchantVerify 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.

Example β€” restrict session to Stripe card payments via Apple Pay and web form
{
"config": {
"modes": ["PAYMENT"],
"vendors": [
{
"vendor": "STRIPE",
"paymentMethods": [
{
"type": "CARD",
"channels": ["APPLE_PAY", "WEBFORM"]
}
]
}
]
}
}
Full scoping rules, client-safe fields, and routing behavior

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.

tip

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.

More FAQs

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.vendors entries each include a valid vendor value; omit the array to use all configured processors
  • vendorConfigs presence and content verified in the response before initializing the payment SDK
  • Client code handles vendorConfigs being absent or empty (legacy account or unmatched filter)
  • clientConfig.publicKey checked for presence before passing to the payment SDK
  • Payment SDK initialized using vendorMerchantId and clientConfig.publicKey from vendorConfigs
  • Processor routing understood β€” processor is resolved at session creation and does not change
  • Error handling implemented for 400 INVALID_REQUEST when config.vendors contains invalid entries
  • Tested with sandbox/staging environment before going live