Documentation

Configure payment provider Stripe

This document explains how to configure payment provider Stripe.

Prerequisites

To configure Stripe the following details are required:

  • Publishable API key
  • Secret API Key
  • Webhook key

Publishable API Key

The Publishable Key is used to verify the authenticity of the messages coming from Stripe

  1. On your Stripe Dashboard click on Developers in the bottom left corner
  2. Click on the tab API keys
  3. If no keys are visible, create a new set of keys
  4. Copy the Publishable key
  5. Paste the Publishable key in the Publishable Key field
  6. Copy the Secret Key
  7. Paste the Secret Key in the Secret Key field

Webhook key

  1. On your Stripe Dashboard click on Developers in the bottom left corner
  2. Click on the tab Webhooks
  3. Click on the button Add endpoint
  4. Set the Endpoint URL to https://YOUR_DOMAIN/notify and replace YOUR_DOMAIN with the domain where the website is. If you have more than one Stripe profile, add the alias of the profile to the URL, for example https://YOUR_DOMAIN/notify?alias=stripe, and create an endpoint for each profile.
  5. Enter a description if you like
  6. Set Listen to on Events on your account
  7. Set Version to Your current version
  8. Select the events to listen to, see Stripe events below
  9. Click on Add endpoint
  10. In the list of Webhooks, click on the URL of the endpoint just created
  11. Click on the word Reveal in the field Signing secret
    Stripe Webhook Signing Secret
  12. Copy the signing secret
  13. Paste the signing secret in the Webhook key field

Stripe events

The webhook needs these events for payments:

  • checkout.session.async_payment_failed
  • checkout.session.async_payment_succeeded
  • checkout.session.completed
  • checkout.session.expired

Add this event to record refunds made in the Stripe Dashboard:

  • charge.refunded

Add these events when the profile uses subscriptions:

  • invoice.paid
  • invoice.payment_failed
  • customer.subscription.updated
  • customer.subscription.deleted

RO Payments answers events it does not need with OK, so selecting more events does no harm.

Description

A description is required to be able to make a payment. The description will help customers identify their payment.

Order Numbers

You can choose which number is used as order number, by default RO Payments uses the order number but you can change this to be the order ID.

Subscriptions

Set Subscriptions to Yes to turn every payment with this profile into a subscription. Stripe charges the first payment at checkout and the following payments automatically.

  • Description: the description of the subscription, you can use the placeholders {ORDERNR} and {ORDERID}
  • Number of payments: the number of payments after the first payment, leave it empty for a subscription that does not end
  • Interval: the time between payments, for example 1 month, 14 days or 1 year. Stripe allows at most one year.

Subscriptions need the subscription events listed under Stripe events. Customers can pay a subscription by card or SEPA Direct Debit; iDEAL and Bancontact pay the first payment and set up SEPA Direct Debit for the following payments. Stripe charges a Billing fee on subscription payments on top of the payment fee.