Skip to main content
The Payment Settings page in Cloud Admin allows you to configure Stripe integration for each project. Your credentials are encrypted and stored securely, with separate configurations for test and live modes.

Accessing Payment Settings

Navigate to Console > Payments > Settings or:
  1. Open the Console sidebar
  2. Click Payments
  3. Select Settings
(((REPLACE_THIS_WITH_IMAGE: cloud-admin-payment-settings-page.png: Payment Settings page showing the configuration form with Test Mode and Live Mode sections)))

Configuration Interface

The settings page provides a tabbed interface for managing test and live credentials:

Test Mode Configuration

1

Open Test Mode Tab

The Test Mode tab is selected by default. Use this for development and testing.
2

Enter Publishable Key

Paste your Stripe test publishable key (starts with pk_test_).Find this in Stripe Dashboard: Developers > API keys
3

Enter Secret Key

Paste your Stripe test secret key (starts with sk_test_).
Keep your secret key confidential. It’s encrypted before storage.
4

Validate Credentials

Click Validate to verify your keys are correct. The system will:
  • Test API connectivity
  • Verify key permissions
  • Display validation status
5

Save Configuration

Click Save to store your encrypted credentials.

Live Mode Configuration

Follow the same steps with your live Stripe keys:
  • Publishable Key: pk_live_...
  • Secret Key: sk_live_...
Only configure live mode after thoroughly testing with test mode. Live credentials process real payments.

Webhook Configuration

Each project has unique webhook URLs that you must register in Stripe:

Get Your Webhook URLs

The settings page displays your webhook URLs:
ModeURL Pattern
Testhttps://api.devkit4ai.com/api/v1/payments/stripe/webhooks/{project_id}/test
Livehttps://api.devkit4ai.com/api/v1/payments/stripe/webhooks/{project_id}/live
Click the copy button next to each URL to copy it to your clipboard.

Register Webhooks in Stripe

1

Open Stripe Dashboard

Go to Stripe Dashboard and select Developers > Webhooks.
2

Add Endpoint

Click Add endpoint and paste your test webhook URL.
3

Select Events

Choose the events to listen for:Required Events:
  • checkout.session.completed
  • customer.subscription.created
  • customer.subscription.updated
  • customer.subscription.deleted
  • invoice.payment_succeeded
  • invoice.payment_failed
Select “All events” during development to see the full event flow.
4

Copy Webhook Secret

After creating the endpoint, reveal and copy the Signing secret (starts with whsec_).
5

Update Cloud Admin

Return to Cloud Admin and enter the webhook signing secret in the settings form.

Validation Status

The settings page shows the current validation status for each mode:
StatusMeaningAction
ValidCredentials verified successfullyReady to use
⚠️ Not ConfiguredNo credentials enteredAdd API keys
InvalidCredentials failed validationCheck and re-enter keys
(((REPLACE_THIS_WITH_IMAGE: cloud-admin-stripe-validation-status.png: Validation status indicators showing valid, not configured, and invalid states)))

Security Considerations

All Stripe credentials are encrypted using AES-256 before storage. Secret keys are never exposed in API responses or logs.
Each project has independent credentials. Compromising one project’s keys doesn’t affect others.
Test and live credentials are stored separately with mode-specific webhook URLs, preventing accidental production charges during development.
All incoming webhooks are verified using the signing secret to prevent unauthorized event injection.

API Reference

The settings page uses these server actions:
ActionPurpose
getPaymentConfigActionFetch current configuration (keys masked)
updatePaymentConfigActionSave new credentials
validateStripeCredentialsActionTest credential validity
getStripeWebhookUrlsActionGet webhook URL for current project
For API integration, see Cloud API Payments documentation.

Troubleshooting

  • Verify you’re using the correct key type (test vs live)
  • Check for extra whitespace when copying keys
  • Ensure the key hasn’t been rolled in Stripe Dashboard
  • Confirm the webhook URL is correctly registered in Stripe
  • Check Stripe Dashboard for webhook delivery attempts
  • Verify the signing secret matches the endpoint
  • Test with Stripe CLI: stripe listen --forward-to <url>
  • Ensure you’ve saved the configuration after entering keys
  • Check that you’re viewing the correct project
  • Verify the project is active

Next Steps