Stripe Integration

Modified on Tue, 1 Dec at 1:51 PM

The Stripe integration allows form users to pay by card as part of a form submission. When the form is submitted, the form user is taken to a secure Stripe-hosted checkout page to complete the payment, and the result is sent back to OneBlink.


TABLE OF CONTENTS


Set Up Stripe

Before setting up the integration in OneBlink, you will need a Stripe account with access to the Developers area of the Stripe Dashboard.


Secret Key

OneBlink uses a secret API key to create payments in your Stripe account.


Step 1: In your Stripe Dashboard, navigate to Developers → API keys.


Step 2: Click Create secret key

You can also use a restricted key, as long as it has write access to Checkout Sessions.





Step 3: Select 'Build your own integration' and click Continue.



Step 4: Select 'Custom permissions' and click Continue.



Step 5: Search for 'Checkout Sessions' and set 'Write' permissions for 'In your account'



Step 6: Give the key a name and click 'Create Key'.



Step 7: Copy and store the key securely, as it will need to be added to the OneBlink Integration.


Note: Whether payments are made in test mode or live mode is determined by the key you use. Test keys start with sk_test_ and live keys start with sk_live_ (restricted keys use rk_test_ and rk_live_). We recommend adding a separate OneBlink environment for each mode, for example "Test" and "Live". 


Static IP Addresses 

We recommend configuring an access policy in your Stripe Dashboard for your live mode keys, so they can only be used from the OneBlink Platform. This protects your account if the key is ever exposed.


Step 1: In your Stripe Dashboard, create an access policy.


Step 2: Give the access policy a name and click 'Continue'.



 Step 3: Select IP addresses, add the following OneBlink static IP addresses, and click 'Continue'.

  • 13.237.140.72/32
  • 13.55.153.155/32
  • 54.253.113.72/32



Step 4: Apply the policy to the secret key you created, and click 'Continue'.



Step 5: Click 'Create policy'.



Add the Webhook

Stripe tells OneBlink about the result of a payment using a webhook. Without it, OneBlink will not know when a payment has completed or expired.


Step 1: In your Stripe Dashboard, navigate to Developers → Webhooks and click 'Add destination'.



Step 2: Configure the Webhook with the following, and click 'Continue'.:

  • Event destination scope: Your Account
  • Payload style: Snapshot

  • Events

    • checkout.session.completed
    • checkout.session.expired



Step 3: For the destination type, select 'Webhook endpoint', and click 'Continue'.



Step 4: Give the destination a name, add the following Endpoint URL, and click 'Create destination'.



Webhook Signing Secret 

Once the webhook endpoint has been added, Stripe will display its signing secret, starting with whsec_. Copy this value, as you will need it when setting up the integration in OneBlink.


Step 1: In the webhooks destination created previously, click 'View' and then click 'Copy' to copy the Signing secret. Copy and store the key securely, as it will need to be added to the OneBlink Integration.


Note: Each webhook endpoint has its own signing secret. Make sure you enter the signing secret into the same OneBlink environment as the secret key it belongs to.




Set Up the Integration


Step 1: Open the Integrations menu and select Setup Integration on the Stripe card.




Step 2: Add an environment and enter the following details, then click Save:

  • Label: A name for the environment, for example, "Test" or "Live".
  • Secret Key: The secret or restricted key from your Stripe Dashboard.
  • Webhook Signing Secret: The signing secret (starting with whsec_) from the webhook endpoint you added.



Adding Stripe to a Form


Step 1: Open the Form you want to take payments with and navigate to the Workflow tab.


Step 2: Add a Payment Event and select Stripe.


Step 3: Configure the payment event:


  • Environment: The Stripe environment to use.
  • Payment Amount: The amount the user will be charged. This can come from a form element, be a fixed amount or be calculated. 
  • Product Name: A customer-facing name that identifies what users are purchasing. 




When the form is submitted, the form user is redirected to a Stripe-hosted checkout page to enter their card details. 


Once the payment is completed, they are returned to the OneBlink receipt page. 


Getting Help

If you need any assistance with the Stripe integration, please reach out through the Report Issue menu or email support@oneblink.io.

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article