your customers. This page gets you to a first mounted checkout and is the hub
for the rest of the documentation. You can integrate at three levels, from quickest to most control:
- Drop-in — all-in-one checkout UI; the quickest way to accept payments.
- Elements — one component per payment method (card form, wallet buttons, and more) for a fully customizable checkout.
- Secure fields — the lowest-level option: mount individual PCI-compliant card input iframes and build your own card-form markup around them. Most control, most work.
Quick start
Install the SDK, initialize it once, then pick the integration that fits your checkout.1. Install the SDK
2. Initialize with your client init response
Call your backend, which calls the Payrails/merchant/client/init API, and pass the response to Payrails.init.
init is asynchronous - it loads the SDK bundle (and its styles) for the version your session was created with, so await it:
payrails client. Handle payment results with the instance-level .on(...) API - the same events fire for any integration below, so you wire them once:
3. Choose your integration
Pick one of the following and mount it into a container on your page. Each example is self-contained and assumes thepayrails client and the .on(...)result handlers from step 2.