Exchange for a payment token
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.
Response contract
The successful wire shape and errors an integration should branch on.
Payment token
application/jsontokenstringrequired- Single-use Myela payment token.
Example response
{
"token": "mtok_01JEXAMPLE"
}Error responses
authentication_failedThe key is missing, malformed, revoked, or invalid for this environment.
invalid_requestOne or more request fields are invalid.