Getting Started

This is perhaps the simplest way to integrate Reepay Checkout. Simply initialize it once a payment session have been created. This will automatically redirect the client to the Reepay Checkout Window, within the same browser tab.

1. Include the Reepay Javascript SDK

<script src="https://checkout.reepay.com/checkout.js"></script>

2. Open Checkout as a window

var rp = new Reepay.WindowCheckout('<< YOUR SESSION ID HERE >>');

Notice that for Subscription sessions the method name is WindowSubscription.

var rp = new Reepay.WindowSubscription('<< YOUR SESSION ID HERE >>');

Events

Events will be fired directly to the Accept and Cancel URLs provided in the session create request as GET parameters, like so:

GET https://yourdomain?id=<the current session id>&invoice=<invoice/charge handle>&customer=<customer handle>&payment_method=<payment method ID stored in Reepay for recurring session or charge session with recurring flag>
ParameterTypeDescription
idstringThe current session id
invoicestringInvoice/charge handle (charge session)
customerstringCustomer handle
subscriptionstringSubscription handle (subscription session)
payment_methodstringPayment method if a new one is created (recurring session or charge session with recurring flag)
errorstringPotential error code on cancel url