Introduction

Reepay Checkout is used when a customer is in the process of making a purchase or saving a payment method for later use (recurring payment or subscription).

The customer is presented with the purchase amount and can enter payment details. Live demo

15431543

Showing the checkout window opened as a modal

Integration

There are three steps in integrating to Checkout:

  1. Prepare a checkout session using the Reepay Checkout API.
  2. Use the Javascript SDK to open the payment window in one of three different ways.
  3. Get the result of the session either through HTTP parameters on return URL or using Javascript event handlers.

API

Before opening the window you must make an API call to create the checkout session.This is done to ensure secure exchange of parameters like amount and allowed payment methods.

The Reepay Checkout API has different endpoints to create a session for different purposes:

  • Create a charge session to make a payment and perhaps also store the card for later usage (recurring or subscription).
  • Create a recurring session to store
    a payment method for later use (recurring or subscription).
  • Create a subscription session to change payment method on a subscription or activate subscription (subscription).

The Checkout Helper can be used to learn and construct requests for the Checkout API. Also see API examples

Opening the window

You can open Reepay Checkout in three different ways using the Javascript SDK:

  • Window - a complete page redirect. Simple integration - very little code required
  • Overlay (Modal) - a full page overlay on top of your web page. Custom integration - some code required
  • Embedded - a component integrated directly into your web page. Custom integration - some code required

The Reepay Checkout Web SDK provides the tools required for integrating Reepay Checkout into your website using JavaScript.

See how the Web SDK can be used on our live demo

Getting the result

Depending on the type of session and session parameters, different parameters are returned on return URL or through Javascript event handler. Notice that these parameters are not tamper safe. We recommend to use one or both of the following approaches:

  • Use webhooks to do the actual state change in own system.
  • Call the Reepay API to get the state of the affected entity. E.g. to get charge after charge session.

A combination of both can be used where return url / event parameters trigger an API get before updating locally, and webhook also update locally. Using database locking it can be guaranteed that thus will only be done once by ignoring if already updated.

Payment methods

With Reepay Checkout you can setup the payment methods you would like to accept.

You can either configure the payment methods in a number of pre-defined configurations or you can specify the payment methods specifically for a charge.

See how to configure the payment methods: Checkout Payment Methods