For general information about accepting payments in Planyo see
Q121: I'd like to accept credit card payments for the reservations.
Which Stripe integration should I choose?
Show
In Planyo we currently offer four Stripe integration methods.
In most cases you should use Stripe Checkout. Checkout uses a prebuilt Stripe-hosted payment page your customer is redirect
to for quick purchases. In addition to standard credit card transactions, Checkout also supports other payment methods, like giropay, eps or bancontact.
Checkout fully supports the new European SCA regulation.
Stripe Legacy is a predecessor of Checkout. This version doesn't support the new European SCA regulation which can affect your business if it is based in the European Economic Area or
you serve customers in the EEA.
Stripe Sofort is a real-time bank transfer payment method available for customers from Austria, Belgium, Germany, Italy, Netherlands and Spain.
Stripe PaymentIntent is an advanced integration method that allows collecting payments on your website. This method also supports the new European SCA regulation.
First, select
Stripe Checkout in the
Payment processing site option on the site settings page.
Next, enter your Stripe API secret key, API publishable key and webhook secret (see the Webhook section below for the last value). For example:
Secret key: sk_live_BQokikJOvBiI2HlWgH4olfQ2
Publishable key: pk_live_6pRNASCoBOKtIshFeQd4XMUh
Webhook secret: whsec_Yq3Tc6fP4556XLdfgM9WHmjmo1r2
You can find the API credentials in your Stripe Dashboard. Click
Developers in the top-right corner and then
API keys in the menu on the left:
In the place of a secret key (sk_live_...) you can also use a restricted key (rk_live_...) which you can create in your
Stripe Dashboard. Using a restricted key allows you to limit access to certain areas of your account data for greater security.
Note that the restricted key needs to have the
Write permission for
All Checkout resources and
Charges.
For test transactions, you should enter the test API secret and publishable keys. Note that test credentials start with sk_test_.... (or rk_test_...) and pk_test_.... Webhooks are also enabled for test and live modes separately.
Make sure to change the credentials and webhook secret to live values when you want to start receiving real payments.
Optionally, you can also enter comma-separated switches to customize the payment process. Type 'email' to prefill the customer's email address field in the Stripe form with the address entered in Planyo.
Note that when the address is prefilled, Stripe doesn't allow to change it anymore on their website. Without this option, no email address will be passed to Stripe and the customer will be able to
enter their email address during the payment process.
Another switch is 'billing-address'. This tells Stripe Checkout to collect the customer's billing address.
By default, Stripe Checkout creates a new Customer each time a transaction is entered. If your Planyo clients make multiple reservations and payments, you can choose to keep transactions of a given client under one Stripe Customer. You can do this by adding the switch ‘reuse-customer'. When this option is on, after a client makes a transaction we keep in Planyo their Stripe Customer id. When later on the client makes another payment, whenever possible we will pass the id to Stripe so the transaction is registered under the same Customer. When ‘reuse-customer' is specified, the email address presented on the payment page is taken from the existing Customer (when it exists and has a valid email set). For this reason, prefilling of the client’s email address from Planyo using the ‘email’ switch will not work.
Options: email,billing-address
In addition to standard credit card transactions, you can turn on additional payment methods in your
Stripe Dashboard. Stripe will present the most relevant payment methods for each customer based on their location and currency used.
Webhook
You need to add a Stripe webhook pointing to a script on our server. This way we can receive updates on your transactions and automatically add payments to the corresponding reservations in Planyo.
You can set up the webhook in the
Webhooks section of your Stripe Dashboard:
When you click
Add endpoint, a view appears where you can specify the webhook settings.
In the
Endpoint URL field enter:
https://www.planyo.com/payment-stripe-checkout-ipn.php
Next, click
Select events below and in the view that opens select the following events:
checkout.session.completed,
payment_intent.succeeded,
payment_intent.payment_failed and
charge.refunded.
If you are going to use any delayed realization payment methods (currently this includes Bacs Direct Debit, Boleto, Canadian pre-authorized debits, OXXO, SEPA Direct Debit and SOFORT), additionally add
payment_intent.processing,
checkout.session.async_payment_succeeded and
checkout.session.async_payment_failed. If you are going to use 'Bank transfer', add also payment_intent.requires_action. For 'Bank transfer', Stripe requires that the customer is created up-front. You can do this by adding the 'create-customer' switch in the
Options field (see above).
Note that for this kind of payment methods there can be a 2-14 day delay in payment confirmation. Click
Add events to close the view.
Once you click the
Add endpoint button to submit the settings, the
Signing secret section appears in the panel at the top (see the picture below).
Click the
Reveal button to see the webhook secret and copy the value.
Next, go back to the
Online payments page in your Planyo panel and enter the value in the
Webhook secret field. Note it always starts with
whsec_.
The webhook secret is necessary for authenticating events coming from Stripe to our system.
Note:
Stripe Checkout requires that your Stripe Account has the name set up in Dashboard. Go to your Stripe admin panel and make sure your account has a name specified in the top-left corener of the page.