Skip to main content

Quick Start

Let's discover How to make a payment transaction by API call in less than 5 minutes.

Getting Started#

Assume you already have a Ksher Payment API gate account, please log in using your user name and password.

Transaction by one single API call#

We can use the built-in swagger try out feature to call the new order API.

For who don't know What is swagger? Swagger is an API documentation have interface built-in API testing tools.

simple_swagger

  1. A new order was generated by calling the POST API
  2. Successful request API was returned payment link.
  3. The payment link was opened in browser, the payment was made via the browser.
  4. The status of the order is paid, it was verified by checking the gateway GUI.
{
"amount": 100,
"merchant_order_id": "20210613_0003",
"note": "some note for 20210613_0003",
"redirect_url": "http://www.google.com",
"redirect_url_fail": "http://www.baidu.com",
"signature": "49083F9F27D1593A34D4BC1D5338ECFEE49F49663ED129D77D3CB3ECBAA962E3",
"timestamp": "1621354265"
}

The POST data for generating the order was as above. After the payment was made sucessful, the browser was redirected to http://www.google.com, according to the redirect_url.

note

The payment link generated by the API is responsive, if you redirect the mobile to open that link, the UX will be mobile optimized.

What's next#

This is a simple demo on how to make payment by only one redirect API call. You can refund the payment either by callint the refund API, or via the GUI of API gateway portal.

To make a fully functional integration, you will also need to know: