Stripe

Prerequisites

To connect your DataPostie instance to Stripe, you first need:

Connect your Stripe account to your DataPostie instance

On the payment methods admin page, create a new payment method with the following details:

  • Specify a payment method name
  • Select Stripe as the payment method type
  • Under Public Key, enter your Stripe live mode publishable key
  • Under Secret, enter your Stripe live mode secret
  • Under Public Key [for Test Mode], enter your Stripe test mode publishable key
  • Under Secret [for Test Mode], enter your Stripe test mode secret
  • Under Parameters, specify:
    • a parameter called priceId with the $0.01 live price ID specified above as the value
    • a parameter called priceIdTest with the $0.01 test price ID specified above as the value

We will specify the webhook signing secrets after this step:

Add a Stripe Payment Method

Once the Stripe payment method is created, you'll be able to see its numeric ID on the payment methods list page. Note this ID down and navigate to your Stripe Webhooks page (https://dashboard.stripe.com/webhooks (opens in a new tab)).

Once you have it, add the following webhook in your Stripe account, replacing YOUR_INSTANCE and YOUR_STRIPE_PAYMENT_METHOD_ID:

https://api.YOUR_INSTANCE.datapostie.com/webhooks/stripe-checkout-session-completed/YOUR_STRIPE_PAYMENT_METHOD_ID

Restrict the listened events to checkout.session.completed:

Create a Stripe webhook for your payment method

Finally, note down the live and test mode webhook signing secrets for this webhook, edit your Stripe payment method in DataPostie, add those two webhooks signing secrets, and update your payment method.

Test the connection to your Stripe account

After your Stripe payment method is created, click the Test button next to it to ensure it is set up correctly. You can always edit it if need be.

Test connection