Payment method support inside ChatGPT
A payment method works inside ChatGPT only when its entire authentication flow stays within the nested iframe, with no popup and no top-level redirect.- Card is fully supported. Secure Fields capture the card details in the iframe, and the 3-D Secure (3DS) challenge renders in the iframe.
- Venmo is supported. Its approval flow uses a QR code that the buyer scans on a separate device, so nothing in the iframe needs to redirect.
- Other methods may work when their flow never leaves the iframe. For example, Apple Pay uses the browser-native payment sheet, which the operating system presents rather than the iframe. This is not guaranteed—test each method before relying on it.
- Redirect-based methods do not work. Methods that send the buyer to a third-party domain to authenticate, such as PayPal, cannot complete inside a ChatGPT app.
Generate the embed token (server-side)
Use the Gr4vy SDK to generate a signed JWT embed token:
Load Gr4vy Embed in the checkout widget
The checkout widget follows the same widget lifecycle as other widgets. After receiving the embed configuration from Load the Gr4vy Embed scriptDynamically load the Gr4vy Embed library from your instance’s CDN:Initialise Gr4vy EmbedCall Gr4vy Embed needs a Gr4vy Embed renders PCI-compliant input fields inside
start_checkout, it loads the Gr4vy Embed script and initialises the payment form. This code runs inside the widget regardless of server language.Receive the embed configurationgr4vy.setup() to render the payment form. The amount, currency, and merchantAccountId must match what was pinned in the JWT token:<form> wrapper and a container <div> with id attributes matching gr4vy.setup():#embed-container. Your app handles the surrounding UI—order summary, result screens, and the submit button. See the reference implementation for a complete example.