Create a transaction

<?php

$request_body = array(
    'transaction' => array(
        'amount' => $context->transaction->amount,
        'currency' => $context->transaction->currency,
        'reference' => $context->transaction->reference
    ),
    'customer' => array(
        'email' => $context->customer->email,
        'ip' => $context->customer->ip,
        'country' => $context->customer->country,
        'locale' => $context->customer->locale
    )
);

$transaction = $MK->createTransaction($request_body);

?>
Request
Content type
Headers
Body
Response
Content type
Headers
Body
checkout.js binds itself to the form within which it was included
We have placed such form to this page:
 <form id="checkoutForm" action="return.php" method="POST">
    <input type="hidden" name="transaction" id="transaction" value=""/>

    <script src="/checkout/dist/checkout.min.js"
        data-key=""
        data-transaction=""
        data-email=""
        data-client-name=""
        data-locale=""
        data-selector="#checkoutBtn"
        data-backdrop-close="false">
    </script>

</form>