Appearance
Stripe Config
Retrieve the Stripe publishable key and optional connected account ID needed to initialize Stripe.js on the client.
Get Stripe Config
GET /v1/ecommerce/config/stripeAuthentication: OAuth Token
Scope: transactcore:payment-intents.read
Rate Limit: 100/min per IP
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
connected_account_id | string | No | Connected account hashkey to resolve the Stripe account ID for Connect mode |
Response
json
{
"publishable_key": "pk_live_xxxxx",
"stripe_account_id": "acct_xxxxx"
}Response Fields
| Field | Type | Description |
|---|---|---|
publishable_key | string | Stripe publishable key for initializing Stripe.js |
stripe_account_id | string | undefined | Stripe Connect account ID (only present when connected_account_id is provided and valid) |
Examples
Basic — get publishable key only:
bash
curl https://api.transactcore.retailsuccessplatform.com/api/v1/ecommerce/config/stripe \
-H "Authorization: Bearer ${TOKEN}"json
{
"publishable_key": "pk_live_xxxxx"
}Stripe Connect — get publishable key and connected account:
bash
curl "https://api.transactcore.retailsuccessplatform.com/api/v1/ecommerce/config/stripe?connected_account_id=cct_00000k1L2m3N4o5" \
-H "Authorization: Bearer ${TOKEN}"json
{
"publishable_key": "pk_live_xxxxx",
"stripe_account_id": "acct_1234567890"
}Client-Side Usage
Use the returned values to initialize Stripe.js:
javascript
import { loadStripe } from '@stripe/stripe-js';
// Fetch config from your backend (which calls TransactCore)
const { publishable_key, stripe_account_id } = await fetchStripeConfig();
// Initialize Stripe
const stripe = await loadStripe(publishable_key);
// Mount Payment Element
const elementsOptions = {
mode: 'payment',
amount: orderTotalInCents,
currency: 'usd',
};
// For Stripe Connect: set on_behalf_of
if (stripe_account_id) {
elementsOptions.on_behalf_of = stripe_account_id;
}
const elements = stripe.elements(elementsOptions);
const paymentElement = elements.create('payment', { layout: 'tabs' });
paymentElement.mount('#payment-element');Notes
- Call this endpoint once when the checkout page loads — cache the result for the session
- The
publishable_keyis safe to expose to the browser (it's a Stripe publishable key, not a secret key) - If
connected_account_idis provided but not found, the response omitsstripe_account_id— no error is returned - Use
stripe_account_idwith Stripe Elementson_behalf_ofto route payments through a specific Stripe Connect account
Changelog
| Date | Change |
|---|---|
| 2026-03-19 | Added connected account lookup endpoint and fixed scope format. |
| 2026-03-19 | Initial publication. |