Skip to content
myela

Opens a checkout session from the merchant's page. intent is one_time (the token will be charged) or store (the token will be attached to a customer with POST /v1/payment_methods — the session itself saves nothing); the whole body is optional and defaults to one_time. Optionally add amount (minor units, up to 99999999) and currency (default USD) on a one_time session, so **Quote a tip and tax** has a base to price. It is a quote hint only and never the amount charged. Set ELEMENTS_ORIGIN in the environment to an origin on this key's allow-list — you manage that list in the portal (Settings → API keys). The request sends it as the Origin header, standing in for the checkout page a browser would name; without it (or with an origin not on the list) the answer is **401** before the body is even read. Returns sessionId, a mountUrl to iframe, and modifiers — your own surcharge/tax/tip configuration, so your page can render a tip control. Nothing in the response names a provider or differs by which one settles the account — that uniformity is the contract, not an implementation detail. The card frame fetches its own configuration from the session id; it does not pass through your page. That is why nothing here identifies a provider even indirectly. **401** means the Origin header is missing or not on this key's allow-list.

Create checkout session (embedded)

POST/v1/checkout_sessionsLink

Opens a checkout session from the merchant's page. intent is one_time (the token will be charged) or store (the token will be attached to a customer with POST /v1/payment_methods — the session itself saves nothing); the whole body is optional and defaults to one_time. Optionally add amount (minor units, up to 99999999) and currency (default USD) on a one_time session, so Quote a tip and tax has a base to price. It is a quote hint only and never the amount charged.

Set ELEMENTS_ORIGIN in the environment to an origin on this key's allow-list — you manage that list in the portal (Settings → API keys). The request sends it as the Origin header, standing in for the checkout page a browser would name; without it (or with an origin not on the list) the answer is 401 before the body is even read.

Returns sessionId, a mountUrl to iframe, and modifiers — your own surcharge/tax/tip configuration, so your page can render a tip control. Nothing in the response names a provider or differs by which one settles the account — that uniformity is the contract, not an implementation detail.

The card frame fetches its own configuration from the session id; it does not pass through your page. That is why nothing here identifies a provider even indirectly.

401 means the Origin header is missing or not on this key's allow-list.

SandboxPublishable key

Request fields

Edit a field and the generated request updates immediately.

Request body
Optional fields1
stringoptional

Whether the card will fund one payment or be stored for later use.

Response contract

The successful wire shape and errors an integration should branch on.

201

Checkout session

application/json
sessionIdstringrequired
Short-lived checkout-session capability.
mountUrlstringrequired
Hosted-frame URL. The session stays in the URL fragment.
expiresAtstringrequired
ISO 8601 expiration timestamp.
captureobjectrequired
Opaque provider-neutral capture configuration.
parentOriginstringrequired
Origin authorized to host the frame.
Example response
{
  "sessionId": "cs_01JEXAMPLE",
  "mountUrl": "https://js.merchantservicedepot.com/v1/frame.html#session=cs_01JEXAMPLE",
  "expiresAt": "2026-08-10T20:51:51.653Z",
  "capture": {
    "scriptUrl": "https://sandbox.example/capture.js"
  },
  "parentOrigin": "https://merchant.example"
}
Error responses
401authentication_failed

The key is missing, malformed, revoked, or invalid for this environment.

422invalid_request

One or more request fields are invalid.