To get started building your checkout there are 3 configuration values you need. These can all be found under Settings -> Developers:
Next you need to generate a client token for each checkout session.
The WhenThen Checkout SDK is available on npm. See @whenthen/sdk-loader
for an API reference.
npm install --save @whenthen/sdk-loader
# or
yarn add @whenthen/sdk-loader
Import the WhenThen SDK Loader
import WhenThenSdkLoader from '@whenthen/sdk-loader';
window.addEventListener('load', async () => {
const checkoutSdk = await WhenThenSdkLoader.loadCheckoutSdkDropIn(elementOrSelector, options);
});
We also provide a wrapper for React. See @whenthen/checkout-sdk-react
for an API reference.
npm install --save @whenthen/checkout-sdk-react
# or
yarn add @whenthen/checkout-sdk-react
If your checkout page is using the Content-Security-Policy header, you'll need to allow the following policies:
script-src
https://static.whenthen.com/
connect-src
https://api.whenthen.com/
Haven’t chosen a checkout option yet? Refer to our comparison table in the Overview page to help you out.
When it comes to accepting payments there are a number of ways you can integrate with WhenThen's API. From Drop-In to Elements - choose the right checkout experience for you.