Skip to content
myela

Exchanges the provider token the fields produced for an opaque mtok_, which is what POST /v1/payments accepts as paymentToken. The session id is the capability — there is no key on this call beyond the publishable one. A session exchanges ONCE; a second attempt is refused, and so is a replay of the resulting mtok_. Both variables come from the frame, so this request cannot be driven from the collection alone until js.merchantservicedepot.com is serving.

Exchange for a payment token

POST/v1/tokensLink

Exchanges the provider token the fields produced for an opaque mtok_, which is what POST /v1/payments accepts as paymentToken.

The session id is the capability — there is no key on this call beyond the publishable one. A session exchanges ONCE; a second attempt is refused, and so is a replay of the resulting mtok_.

Both variables come from the frame, so this request cannot be driven from the collection alone until js.merchantservicedepot.com is serving.

SandboxSession capability

Request fields

Edit a field and the generated request updates immediately.

Request body
stringrequired

The short-lived checkout-session capability.

stringrequired

The processor token exchanged inside the hosted Elements frame.

Response contract

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

201

Payment token

application/json
tokenstringrequired
Single-use Myela payment token.
Example response
{
  "token": "mtok_01JEXAMPLE"
}
Error responses
401authentication_failed

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

422invalid_request

One or more request fields are invalid.