Window Checkout
Getting Started
This is perhaps the simplest way to integrate Billwerk+ Payments Checkout. Simply initialize it once a payment session have been created. This will automatically redirect the client to the Billwerk+ Payments Checkout Window, within the same browser tab.
- Include the Billwerk+ JavaScript SDK
HTML include the Reepay JavaScript SDK
<script src="https://checkout.reepay.com/checkout.js"></script>
- Open Checkout as a window
Window Initialise using the Reepay JavaScript SDK
var rp = new Reepay.WindowCheckout(' YOUR SESSION ID HERE ');
Note
Notice that for Subscription sessions, the metod name is
WindowSubscription
.
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=<thecurrentsessionid>&invoice=<invoice/chargehandle>&customer=<customerhandle>&payment_method=<payment_method_ID_stored_in_Reepay_for_recurring_session_or_charge_session_with_recurring_flag>
Parameter | Type | Description |
---|---|---|
id | string | The current session id |
invoice | string | Invoice/charge handle (charge session) |
customer | string | Customer handle |
subscription | string | Subscription handle (subscription session) |
payment_method | string | Payment method if a new one is created (recurring session or charge session with recurring flag) |
error | string | Potential error code on cancel URL |
Updated 9 months ago
What’s Next