Introduction
API tester
Welcome to the API tester section of MakeCommerce developer portal. Here you can try out our REST API very easily. We have a small tutorial on how to use our API tester, head out to the API Docs section to find out more.
Basic flow
- The buyer has reached to the check-out page on e-shop site
- The shop presents the selection of payment methods available
- The buyer makes a choice and proceeds to payment
- The shop registers a new Transaction in MK-API and directs user to the selected payment channel – either redirects to bank-link or launches the Credit Card Dialog
- Shop server now creates the transaction in MK API and recieves back an array of urls pointing to payment channels
- Depending on method the user selected, the e-shop server:
- Case banklink: redirects user to the banklink url supplied by the transaction creation response
- Case credit card: launches MK Credit Card Dialog by invoking checkout.js
- Payment links should not be placed inside an iframe, otherwise payments will not work.
- The user performs the payment in the channel
- Returning from:
- Bank link: user is redirected to
return_url
of the shop with payment_return
message
- Credit card dialog: user is redirected back with
token_return
message (POST to return_url
)
- Payment links should not be placed inside an iframe, otherwise payments will not work.
- The shop will verify the message and state of transaction within and display successful payment confirmation page (or goes back to payment method selection step)
- MK servers will send additional async message about the transaction status change to the shop server’ notification_url (see notifications))
See also the
Payment Gateway aka 'redirect method' that is even more simple way for integration.
There is also a small PHP SDK for API communication available in
GitHub.
And as a new addition, there is also a Java SDK available in
GitHub.