Merchant Server Implementation

Sample Project to implement Merchant Server.


Mandatory


  • Create Token (Checkout) : This API proxies the request to Snap Backend. This process generates the Snap token reqquired for the secure communication between Mobile SDK and Midtrans.



Optional


We also additionally call a few endpoints if 1-Click or 2-Clicks is enabled :

  • To Store Credit Card Tokens: We explicitly invoke POST on /users/<userid>/tokens to allow the backend to store generated credit card token after a successful Credit card charge.
  • To Retrieve Credit card Tokens : We explicitly invoke GET GET /users/<user_id>/tokens to retrieve saved card list.