Bc payments configure academy stripe

From breatheco-de/apiv2 · View interactive version

Bc payments configure academy stripe is an AI agent skill from the GitHub repository breatheco-de/apiv2. Use when academy staff need to configure Stripe API keys and webhook secret for their academy; do NOT use for payment method catalog CRUD, subscription cancel/refund, or student card onboarding.

How to use this skill

Skill file

Skill: Configure Academy Stripe

When to Use

Concepts

Workflow

  1. Authenticate staff with crud_academy_payment_settings. Send Authorization and Academy: <academy_id>.
  2. Save Stripe keys via PUT /v1/payments/academy/paymentsettings with stripe_api_key and stripe_publishable_key (partial body OK).
  3. In Stripe Dashboard, create a webhook endpoint pointing to https://<api-host>/v1/monitoring/stripe/webhook with payment lifecycle events (charges and payment intents at minimum).
  4. Copy the signing secret (whsec_...) from Stripe and PUT it as stripe_webhook_secret on the same endpoint.
  5. Verify publishable key exposure: GET /v1/payments/academy/publishable-key?academy=<id> must return 200 with a non-empty stripe_publishable_key.
  6. If staff also need a credit-card checkout option, hand off to bc-payments-manage-academy-payment-methods (Path A) — only after Step 5 passes. Do not POST is_credit_card: true payment methods before publishable-key verification succeeds.

Endpoints

Update academy Stripe credentials

Request example (partial — Stripe only):

{
  "stripe_api_key": "sk_live_51PxAbCexampleSecretKey",
  "stripe_publishable_key": "pk_live_51PxAbCexamplePublishableKey",
  "stripe_webhook_secret": "whsec_exampleSigningSecretFromStripe"
}

Response 200:

{
  "stripe_api_key": "sk_live_51PxAbCexampleSecretKey",
  "stripe_webhook_secret": "whsec_exampleSigningSecretFromStripe",
  "stripe_publishable_key": "pk_live_51PxAbCexamplePublishableKey",
  "coinbase_api_key": null,
  "coinbase_webhook_secret": null
}

Optional body fields also accepted: coinbase_api_key, coinbase_webhook_secret (Coinbase Commerce; not required for Stripe-only setup).

Verify publishable key (public)

Response 200:

{
  "academy_id": 55,
  "academy_name": "Miami Academy",
  "academy_slug": "miami",
  "stripe_publishable_key": "pk_live_51PxAbCexamplePublishableKey"
}

Use this response in Step 5 as the gate before credit-card payment method creation.

Stripe webhook receiver (register in Stripe Dashboard)

Edge Cases

Checklist

  1. stripe_api_key, stripe_publishable_key, and stripe_webhook_secret saved via PUT.
  2. Webhook endpoint registered in Stripe pointing to /v1/monitoring/stripe/webhook.
  3. GET /v1/payments/academy/publishable-key?academy=<id> returns 200 with non-empty stripe_publishable_key.
  4. If credit-card catalog is needed, hand off to bc-payments-manage-academy-payment-methods Path A.

Next steps

After Stripe is connected, load bc-payments-manage-academy-payment-methods to set main_currency (if needed), create payment method catalog entries, and follow that skill's Next steps for services, plans, and courses.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.