# Hosted Fields - JSAPI Building with an AI agent? Start at https://docs.payme.io/agents.md Put PayMe's card inputs in your own checkout form with the browser SDK, then charge the token from your server with generate-sale. Hosted Fields put PayMe's card inputs inside your own checkout form as PayMe iframes. The browser SDK (`window.PayMe`) returns a token, and your server charges it with `generate-sale` and `buyer_key`. Start with the [Hosted Fields JSAPI guide](/accepting-payments/checkout-and-in-person/hosted-fields-jsapi-guide). ## Endpoints - [Charge a Hosted Fields token](/payments/hosted-fields-jsapi/post-generate-sale-hosted-fields-jsapi): POST /generate-sale