Skip to content
David Cook edited this page Jan 18, 2024 · 1 revision

VCR Fixtures

Stripe tests use real requests to test against the Stripe API. Rather than execute these every time, the responses are recorded to a fixture file. These need refreshing from time to time, particularly when upgrading Stripe versions. There is a helper script to do this easily:

script/test-stripe-live

Stripe test account

A Stripe account is required to test against the API. Two secret variables are required:

# add these lines in .env.test.local

STRIPE_SECRET_TEST_API_KEY="sk_test_••••"
STRIPE_CLIENT_ID="ca_••••"

For those that have access to BitWarden, a shared key and client ID may be found under Stripe Secret Test API Key

These secrets are filtered out in vcr_setup.rb and will not be saved in the fixture files.

Clone this wiki locally