Spaces:
Running
Running
Add examples/: connector docs, OpenAPI for new endpoints, Hub listing copy, Stripe test script
387d030 verified | # Smoke-test the Stripe connector with YOUR Stripe test key. | |
| # Usage: ./test_stripe.sh rk_test_xxx [limit] | |
| # | |
| # Use a RESTRICTED, READ-ONLY test-mode key (Stripe Dashboard β Developers β | |
| # API keys β Create restricted key β read access: Customers, Invoices, | |
| # Subscriptions). Make sure your Stripe TEST account has a couple of customers. | |
| # The key is sent to the live Space over HTTPS, used in-memory, and not stored. | |
| set -euo pipefail | |
| KEY="${1:?Pass your Stripe test key: ./test_stripe.sh rk_test_xxx [limit]}" | |
| LIMIT="${2:-25}" | |
| BASE="https://shaankar39-revai-api.hf.space" | |
| # These two headers simulate the RapidAPI gateway. For a real gateway call, | |
| # use your RapidAPI key against revai1.p.rapidapi.com instead. | |
| curl -s -m60 \ | |
| -H "X-RapidAPI-User: stripe-smoke" \ | |
| -H "X-RapidAPI-Proxy-Secret: ${REVAI_PROXY_SECRET:?export REVAI_PROXY_SECRET=<your gateway proxy secret>}" \ | |
| -H "Content-Type: application/json" \ | |
| -X POST "$BASE/v1/connect/stripe" \ | |
| -d "{\"stripe_key\":\"$KEY\",\"limit\":$LIMIT,\"model_type\":\"churn\"}" \ | |
| | python3 -m json.tool | |