Skip to navigation

Create Embed Session

Mint an embed session token for one of your sub-merchants, to hand to an embedded onboarding iframe. Requires an ADMIN API key and the x-coinflow-submerchant-id header naming a child or grandchild merchant.

Each token is valid for 15 minutes. The iframe renews it itself through POST /embed/session/refresh; renewals stop 8 hours after this mint, at which point a new token must be minted here.

parentOrigin is the origin of the page that frames the iframe. It must be covered by one of the whitelisted URLs, and the iframe posts its onboarding events only to this origin. Omit it to mint a link-only session: the sub-merchant opens the page directly instead of in an iframe, and the page refuses to load when framed.

returnUrl is where a sub-merchant who opened the page as a link goes back to after submitting. It must be covered by one of the whitelisted URLs.

Authentication

Headers

x-coinflow-submerchant-idstringOptional

Required. The sub-merchant the session is for.

Request

This endpoint expects an object.
parentOriginstringOptional

Origin of the page that frames the onboarding iframe, e.g. https://app.example.com. Must be covered by a whitelisted URL. The iframe posts its events only to this origin. Omit it to mint a link-only session, which opens as a full page and refuses to load in any iframe.

returnUrlstringOptional

Where the sub-merchant returns to after submitting, when the page is opened as a link. Must be an http(s) URL covered by a whitelisted URL.

Response

Ok
tokenstring
expiresAtdouble

Unix seconds at which token expires.

Errors

400
Bad Request Error
401
Unauthorized Error