Checkout sessions are the standard boundary between a merchant order system and SixPay checkout. They keep product, quantity, amount, and promotion-rule identifiers on the merchant server while allowing SDK UI to show the customer a safe order summary.

Merchant API Key

Create a Merchant API Key in Developers > Merchant API Keys in SixPay Merchant Console. Grant it the checkout_session:create scope for server-side session creation. Store the mapi_... secret in server configuration. Do not send it to a browser or use it to create another API key.

Create a session

The server must supply merchantOrderId, items, and every item’s lineItemId, quantity, and decimal-string unitAmount. Optional skuId, spuId, and categoryIds allow trusted promotion-rule matching. metadata.title, metadata.description, and HTTPS metadata.imageUrl are the only product presentation fields exposed to the browser. Do not put private fulfillment data in session metadata.

Response and browser boundary

Return those fields only to the checkout page. The browser uses the token in transient memory; it must not place it in a URL, local storage, analytics event, or log. See the API reference for fields and the SDK UI guide for browser integration.