Configure live Stripe keys

Changed on

<Info>This API is in beta. Endpoints, fields, and behavior may still change, so avoid depending on it in production.</Info>

Switches the app to live mode using live Stripe keys you already have from the Stripe dashboard, sent directly in the request body, rather than keys Base44 creates for you. Use Provision live Stripe keys instead to have Base44 create them automatically once the sandbox's Stripe account is activated.

Stores the keys, backs up the current test credentials, and redeploys backend functions with the updated secrets.

Base44 checks the key prefixes and retrieves the secret key's Stripe account. When that account differs from the sandbox's installed live account, Base44 registers a separately signed webhook for payment analytics before storing the keys. The secret key needs account read and webhook management permissions for this setup. Base44 doesn't verify that the publishable key belongs to the same account or that the account can process payments.

Automatic migration of an existing app-function webhook remains best effort.

If retiring the previous analytics destination fails, the new keys may already be stored. Retry the same configuration to finish the pending setup.

Requires write access to the app. Workspace viewers cannot call this operation.

post/api/apps/{app_id}/payments/stripe/configure-live-keys

Request

  • Base URL
    https://app.base44.com
  • URL
    https://app.base44.com/api/apps/{app_id}/payments/stripe/configure-live-keys
  • Auth
    HTTP bearer

Path parameters

app_idstring required

ID of the Base44 app.

Request body

publishable_keystring required

Live Stripe publishable key beginning with pk_live_.

secret_keystring required

Live Stripe secret or restricted key beginning with sk_live_ or rk_live_.

webhook_secretstring nullable

Live webhook signing secret beginning with whsec_. Defaults to null, which attempts automatic migration when an existing webhook secret is present.

Example request

{
  "publishable_key": "pk_live_example",
  "secret_key": "sk_live_example",
  "webhook_secret": "whsec_example"
}

Response

The operation result.

successboolean required

Whether live keys were stored and the app was switched to live mode.

messagestring required

Human-readable configuration result.

live_keys_configuredboolean required

Whether the stored completion flag was confirmed. It can be false even after keys were stored if finalization failed.

webhook_migratedboolean required

Whether this call automatically migrated the webhook. It is false when a webhook secret was supplied directly.

Example response

{
  "success": true,
  "message": "Live mode API keys configured successfully. Test keys have been backed up.",
  "live_keys_configured": true
}

Changes

    • info

      added the media type application/json for the response with the status

    • info

      added the non-success response with the status

    • info

      the endpoint scheme security PersonalAccessTokenAuth was added to the API