9.Payments

9.1Payment Gateways

If at least one of your services is priced and requires an immediate payment, or the payment is discretional, you should activate at least one of the TeamBooking's bundled payment gateways.

TeamBooking is bundled with two payment gateways ready to be configured: PayPal and Stripe.

VERY IMPORTANT: when you're logged in as administrator, the plugin always skips any eventual payment step (so you can easily book a reservation on behalf of a customer via frontend). So, if you're willing to test the payment gateways, please do so while not logged in as administrator.

The first step, anyway, is to select your desired currency in the Payments gateway tab. Please note that TeamBooking checks if the selected currency is supported by your gateways, deactivating those who don't support the selected currency.

9.1.1PayPal

IMPORTANT: in order to correctly use PayPal without issues, your server must be SHA256, TLSv1.2 and G5 compliant.

The PayPal gateway tab is quite self-explanatory. There you can configure your payments settings providing some basic information as PayPal account email and a redirect URL when payment is done.

Here's a settings overview:

  • PayPal account email

    All the PayPal payments will be addressed to this account.

  • PayPal primary e-mail (optional)

    Payments received will be checked against this e-mail. Use this setting if your PayPal account handles multiple e-mail and the payments are not addressed to your primary one.

    IMPORTANT: use it if you know what you are doing and ensure your primary PayPal e-mail address is this otherwise payment notifications will fail.

  • Redirect URL

    After a PayPal payment, the customer will be redirected to this URL. Please note: the customer can choose to skip this step, so don't assume he will always land to that redirect page.

  • Checkout logo (optional)

    An image that will be shown in PayPal checkout page. It must be 150x50px.

  • IPN listener method

    The default is cURL, and you should leave it as is. If you have issues like reservations kept in pending status after a payment is made, try to change method, but do that only if you know what you're doing. Otherwise just ask for assistance to our support.

  • Use PayPal Sandbox for testing

    If you want to test the whole payment process, you can activate this option to test with fake payments. Only do that if you really know what the PayPal Sandbox is, and the consequences of testing, e.g., in a localhost environment.

  • Debugging IPN errors

    You can activate both the options if you're experiencing issues like reservations kept in pending status after a payment is made. Once activated, you should make a test reservation to trigger the issue, and click read to read the logs, or report them to our support. This helps our support to collect useful info about a possible failure of the PayPal IPN chain.

    About the IPN chain. What is an IPN? It is an Instant Payment Notification from PayPal. When a customer makes a payment with PayPal, the payment is made on the PayPal website. So, your site needs to know when the payment is done, and if it's correct.

    This is accomplished via IPNs, so TeamBooking adds an IPN listener to your site, in order to listen for any incoming IPN from PayPal. In case of success, the plugin updates the relative reservation status.

    PayPal introduced a very severe security standard for IPN. So, you server must be SHA256, TLSv1.2 and G5 compliant in order to be able to process any IPN callback. That's why, if you have issues with reservations that stays in pending payment status, the reason must be investigated in your server.

    So far, the majority of IPN issues were due TLSv1.2 protocol not correctly implemented, or not implemented at all by the server.

9.1.2Stripe

The Stripe gateway tab is quite self-explanatory too. There you can configure your payments settings providing some basic informations as Stripe secret key and publishable key, receipt and so on.

A note on credit cards: customer's credit card information will not be saved nor processed in your server, as TeamBooking uses the stripe.js library. That means: security is not your concern, credit card infos go from customer's pc straight to Stripe servers, and your server will receive just a token to process the payment.

9.2How to set a priced service

Here's an example on how to fully configure a priced service, let's say a "package delivery service", that suits your needs. We will assume you have already configured your currency and your payment gateways, as shown in the previous paragraph.

In the service settings, we're going to set a price of 10 $ and set the payment requirement to Immediately.

You can also choose Later,in which case you don't need a payment gateway, or At the customer's discretion,in which case the reservation is immediately confirmed, and the customer can choose to pay right after the reservation, or later in time (you'd better insert the payment link hook in the customer's confirmation e-mail message, to eventually allow this).

We are also going to set a particular option in the reservation form. If that option is selected by the customer, then a defined increment in the price is added.

In our example, we are going to do that with a Radio group custom form field, but you can do that with Select fields too. Near the option we want to set as a price increment, we should click on the little gear icon.

In the modal, we put a price increment value of 5.00 $ and press the Set button.

The gear icon is now green, and we must save the custom field (or the changes will be lost!).

Our paid service is now fully configured, and that's how the reservation form looks like:

9.3Promotions

The Promotions tab of the dashboard lets you to promote your services by the creations of two kind of promotions:

  • Campaign

    A promotional campaign is a period of time in which one or more services have a discounted price.

  • Coupon

    A promotional coupon is a text string the customer can use to apply a certain discount to one or more services.

When a reservation is made taking advantage of a particular promotion, the promotions used are listed under the reservation detail, in the Overview tab.

But let's see how to configure those promotions, in detail.

9.3.1Campaign

By pressing the button New campaign, a new campaign modal will be shown. You will be asked to provide details about your campaign.

Under the General tab:

  • Name

    Provide a name to your campaign. This is not relevant in the frontend.

  • Discount

    Provide a discount. You can set a fixed discount or a percentage discount, both applied to the base price of the service (if the service is of Event class, the discount is applied to each ticket)

  • Start/End date

    The boundaries of the time period during which the campaign is active.

Under the Advanced tab:

  • Maximum uses

    How many times (reservations) the discount can be used. Leave 0 for no limit.

  • Timeslots Min Start/Max End date

    If active, the promotion will be applied only to timeslots that comply with those dates. You can specify just one of them, or both.

Under the Services tab:

  • Services

    Select the services the campaign is applied to. For convenience, the base price and the result discounted price are reported.

Then, just press the Add button to create your campaign.

9.3.2Coupon

By pressing the button New coupon, a new coupon modal will be shown. You will be asked to provide details about your promotional coupon.

Under the General tab:

  • Name

    Provide a name to your coupon. This name is the coupon, so it is the string the customers should insert to claim it.

  • Discount

    Provide a discount. You can set a fixed discount or a percentage discount, both applied to the base price of the service (if the service is of Event class, the discount is applied to each ticket)

  • Start/End date

    The boundaries of the time period during which the coupon is active.

Under the Advanced tab:

  • Maximum uses

    How many times (reservations) the discount can be used. Leave 0 for no limit.

  • Timeslots Min Start/Max End date

    If active, the promotion will be applied only to timeslots that comply with those dates. You can specify just one of them, or both.

Under the Services tab:

  • Services

    Select the services the coupon is applied to. For convenience, the base price and the result discounted price are reported.

Then, just press the Add button to create your coupon.

9.3.3Manage your promotions

The promotions list shows some useful information about your promotion campaigns and coupons.

The Uses column shows how many times a promotion was used.

Under the Actions column, you can delete your promotion (trash button) and edit your promotion (pencil button)

Furthermore, if we are within the promotion time period, you can also deactivate the promotion (pause button) and reactivate it (play button).

The Status column can have those values:

  • Running

    The promotion is active and running.

  • Not running

    The promotion is not yet running because scheduled to begin in a later time.

  • Expired

    The promotion is expired and not running anymore. It can't be reactivated, unless you extend its end time.

  • Deactivated

    The promotion is not expired, yet not running. That means it was manually deactivated (pause button). Just press the play button if you intend to reactivate it.

9.3.4Frontend appearance

When a service price is discounted by an active campaign, any service slot shows the discounted price:

The footer of the reservation form shows the discounted price too, in a more catchy way:

The discounted services are also evident in the services selection dropdown:

On the contrary, active coupon promotions are not evident unless the Book now button is pressed. At that point, in the reservation overview, a field for the coupon will be shown:

If a valid coupon code is redeemed, the price is updated accordingly: