1. Integrate the form as documented
Build and embed the form as described in Hosted Card Entry Form, and use it as we provide it. For production, we recommend the API session option, because the form configuration is set on your server and is not visible in the iframe URL.2. Use the form as your only card entry point
The form must be the only place on your website where card data is entered.- Do not collect card numbers, expiry dates or security codes in your own fields.
- Do not modify the form, and do not place other elements over it.
- To change how the form looks, use a stored stylesheet.
3. Serve the host page over HTTPS
The page that contains the iframe must be served over HTTPS. The success URL, the failure URL andpostMessageHost must also use HTTPS, as stated in Request Card Entry Form.
4. Keep your credentials on your server
Your API key must stay on your own systems.- Never put your API key in browser code, public repositories or logs.
- Create session tokens or access tokens on your server, and pass only those to the browser.
- With the API session option, the form URL you put in the iframe contains no configuration and no credentials.
5. Check the origin of every postMessage
If you use postMessage, checkevent.origin on every message your page receives, and ignore any message that does not come from https://service.pcibooking.net. When you send commands to the form, set the target origin to https://service.pcibooking.net. The samples in PostMessage Notifications do both.
6. Content Security Policy (recommended)
A Content Security Policy is not required, but we recommend one.- If you run a Content Security Policy, allow
https://service.pcibooking.netinframe-src, or the browser will block the form. - If your success and failure pages are on a different domain from the host page, allow that domain in
frame-srctoo, because the form redirects to them inside the iframe. - Restrict the scripts that can run on the host page to the ones you need.

