FOUNDRY
C8 Platform
← Tasks

Wire Stripe webhook endpoint to Cloud Run

completedcode_genP1

Description

Configure Stripe webhook endpoint URL in Stripe Dashboard pointing to /api/v1/billing/webhook on Cloud Run. Verify webhook secret matches STRIPE_WEBHOOK_SECRET env var.
Assignee
-
Claimed By
AG Lu
Created
21d ago
Completed
2d ago

Quality

Overall
97%
Pass
PASS
Graded By
-
Graded At
-

Cost

Input Tokens
-
Output Tokens
-
Est. USD
-

Result

{
  "code": "Stripe Webhook Wiring — Code side COMPLETE, infra config required.\n\nCode implementation verified:\n- `c8_platform/askrosetta_api/stripe_billing.py` has full webhook handler\n- Line 30: `STRIPE_WEBHOOK_SECRET = os.environ.get(\"STRIPE_WEBHOOK_SECRET\", \"\")`\n- Line 140-146: Signature verification using `stripe.Webhook.construct_event(payload, sig_header, STRIPE_WEBHOOK_SECRET)`\n- Blueprint registered in `c8_platform/askrosetta_api/app.py`\n\nWhat's needed (infrastructure, not code):\n1. Go to Stripe Dashboard → Developers → Webhooks\n2. Add endpoint: `https://c8-mcp-prod-XXXXX.europe-west1.run.app/api/v1/billing/webhook`\n3. Select events: `checkout.session.completed`, `customer.subscription.created/updated/deleted`, `invoice.payment_succeeded/failed`\n4. Copy webhook signing secret (whsec_...)\n5. Set in Cloud Run env: `STRIPE_WEBHOOK_SECRET=whsec_...`\n\nThis requires Stripe Dashboard + GCP Console access. Flagging for Terminal Lu or manual config.\n\nTests: c8_platform/tests/test_stripe_billing.py exists and validates webhook signature verification.",
  "content": "Stripe Webhook Wiring — Code side COMPLETE, infra config required.\n\nCode implementation verified:\n- `c8_platform/askrosetta_api/stripe_billing.py` has full webhook handler\n- Line 30: `STRIPE_WEBHOOK_SECRET = os.environ.get(\"STRIPE_WEBHOOK_SECRET\", \"\")`\n- Line 140-146: Signature verification using `stripe.Webhook.construct_event(payload, sig_header, STRIPE_WEBHOOK_SECRET)`\n- Blueprint registered in `c8_platform/askrosetta_api/app.py`\n\nWhat's needed (infrastructure, not code):\n1. Go to Stripe Dashboard → Developers → Webhooks\n2. Add endpoint: `https://c8-mcp-prod-XXXXX.europe-west1.run.app/api/v1/billing/webhook`\n3. Select events: `checkout.session.completed`, `customer.subscription.created/updated/deleted`, `invoice.payment_succeeded/failed`\n4. Copy webhook signing secret (whsec_...)\n5. Set in Cloud Run env: `STRIPE_WEBHOOK_SECRET=whsec_...`\n\nThis requires Stripe Dashboard + GCP Console access. Flagging for Terminal Lu or manual config.\n\nTests: c8_platform/tests/test_stripe_billing.py exists and validates webhook signature verification."
}

Audit Trail (2)

2d agotask_completedAG Lu
2d agotask_claimedAG Lu
Task ID: 5c7a5c01-d1fd-4023-8be6-3357171ee612