kepa
Checkout/getCnpClientConfig

Get Client Config

Load browser-safe CNP capabilities for kepa.js.

GET/api/v1/cnp/client-config
Browser-safeCall from the customer’s browser with a publishable key — never your secret key.
Returns the merchant's browser checkout configuration after publishable-key and Origin validation. kepa.js uses this to discover available payment methods, card brands, feature flags, branding, SDK URL, and card iframe URL.

Response

application/json

merchantIdstring

Merchant identifier bound to the publishable key.

environmentstring

Runtime environment.

Example "production"
sdkUrlstring

kepa.js URL.

cardElementUrlstring

Hosted card iframe URL.

paymentMethodsarray

Enabled browser payment methods.

Example "card, apple_pay, google_pay"
cardBrandsarray

Enabled card brands.

featuresobject

Feature flags such as hpp, elements, saved payment methods, 3DS, and wallets.

brandingobject

Merchant browser checkout branding.

Good to know
  • Send X-Kepa-Publishable-Key from merchant-embedded pages.
  • The browser Origin must match the merchant's configured allowed origins.
  • Kepa-hosted HPP can use same-origin calls without exposing a merchant API key.

getCnpClientConfig

GETGo API
https://api.kepapay.co/api/v1/cnp/client-config
Request
curl https://api.kepapay.co/api/v1/cnp/client-config \
  -H "X-Kepa-Publishable-Key: $KEPA_PUBLISHABLE_KEY"
Response
{
  "merchantId": "mch_123",
  "environment": "production",
  "sdkUrl": "https://pay.kepapay.co/kepa.js",
  "cardElementUrl": "https://pay.kepapay.co/kepa-elements/card",
  "paymentMethods": ["card", "apple_pay", "google_pay"],
  "cardBrands": ["VISA", "MASTERCARD", "AMEX", "DISCOVER"],
  "features": { "hpp": true, "elements": true, "dropin": true, "threeDs": true },
  "branding": { "displayName": "Kepa Coffee" }
}