Skip to main content

Stripe Payments

Here we will talk about how to use and test Stripe Payments with Blueprint.

Initializing Stripe​

In order to use Stripe Payments in your app, you must first add a Stripe Publishable Key (found in your stripe developers dashboard) to your vercel environment variables. The key should be named NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY, with the value being your Stripe Publishable Key (ensuring that you're using the correct test v live mode key per environment). It should look something like this: pk_test_qblFNYngBkEdjEZ16jxxoWSM.

Stripe​

For payment processing, you can use Stripe once it is integrated with your Kraken instance. Without it being set up, you won't be able to process payments on your Blueprint app.

Set up environment variables​

You can find every Stripe environment variable at https://dashboard.stripe.com/apikeys. You can learn more about these keys at https://docs.stripe.com/keys?locale=en-US#obtain-api-keys.

Look for the "Publishable key" and use it as the value of the NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY environment variable in your .env.local file.

Using Stripe Payments​

An example of using Stripe Payments can be found in the one-off card payments flow.

Testing Stripe Payments​

While in any non-production environments you should ensure the Stripe Publishable Key you're using in the Initializing Stripe step are in test mode. This will allow you to make payments using test credit card details (examples here). Once you have made a test payment, you can verify the payment on the ledger payments and charges page.