1
Create a Payment Intent on your server
Call The response returns the See Create a Payment Intent for the full request and response.
POST /payment-intents with your secret key when the customer reaches checkout. Amounts are integers in the currency’s smallest unit (for PHP, centavos).id and client_secret you hand to the browser:2
Include the SDK
Load the library from the Modulus CDN with a single script tag. Load it from the CDN, do not self-host or bundle a copy, so you are always on the latest patched build.You point at
/v1, not a pinned version like /v1.4.2. Patches and backward-compatible fixes ship behind that same URL, so the browser always fetches the latest v1 build. The script exposes a global Modulus.3
Initialize and mount the card fields
Construct See Card fields for field types, styling, and events.
Modulus with your publishable key, create an Elements group scoped to the intent, then mount the fields into placeholders on your page.4
Confirm the payment
On submit, call 3D Secure runs inside
confirmPayment with the mounted elements and the cardholder billing details. It collects the card securely, runs 3D Secure if required, and resolves once with the final result.confirmPayment for both flows: frictionless cards resolve without a challenge, and challenge cards render the bank’s step in your threeds-container. See 3D Secure for the container, window sizing, and lifecycle, and Confirm the payment for billingDetails and every result status.