Ecommerce

Don't integrate with this API; use checkout-API instead Checkout API. Ottu offers ecommerce plugin, which empowers merchants business and facilitates the payments against the products.

POST <ottu-url>/pos/crt/

The variable URL is the installation domain. The URL must be secure, i.e.: https://...

Required

amount string

Against currency type for the decimal places.

gateway_code string

Gateway account code defined in admin panel.

currency_code string

Letters only. ISO 4217 codes https://en.wikipedia.org/wiki/ISO_4217. Validated against the gateway settings currencies list defined in admin. Max length: 3.

capture_addressbool (Required, if the multi step is enabled)

It will display the form fields if received True in a request payload and the child plugin of multi step is enabled.

capture_deliverybool (Required,if multi step child plugin is enabled)

It will display the Map to mark the location, upon accessing the payment request link by customer, when the multistep child plugin is enabled.

Optional

language string

ISO 639-2 language code. https://www.loc.gov/standards/iso639-2/php/code_list.php. Max length: 2.

order_no string

Merchant unique identifier. Max length: 128.

email_payment_details bool

Send email to the customer with payment result details. Validated against customer_email.

sms_payment_detailsbool

Send email to the customer with payment result details. Validated against customer_phone.

sms_notification bool

Send payment link to customer to pay via SMS. Validated against customer_phone.

email_notification bool*

Send payment link to customer to pay via email. Validated against customer_email.

customer_email

Customer email. Validated against customer_email

customer_phonestring

International phone number, with prefix. Max length: 16.

customer_first_name string

customer_last_namestring

customer_address_line1 string

no specific limit.

customer_address_line2string

no specific limit.

customer_address_city string

Add a default address from admin. Max length: 40.

customer_address_state string

Max length: 40.

customer_address_country string

ISO 3166-1 alpha-2 – two-letter country codes https://en.wikipedia.org/wiki/ISO_3166-1. Max length: 2.

customer_address_postal_code integer

Max length: 12.

vendor_name string

Vendor name is mapped to udf6 for kpay or knet. Max length: 64.

email_recipients string

Comma separated emails. Recipients to receive emails, beside customer_email.

product_type string

Product information. Max length: 128.

redirect_url string (optional, if is set in admin control)

URL where the user to be redirected after payment process has completed. Note that in includes in query string order_no and reference_number. Can be set in admin panel also. Max length: 200.

disclosure_urlstring (optional, if is set in admin control)

URL where to send the payment result details. Must return a http status 200, in order to proceed with redirection to redirect_url. Can also be set in admin panel. Max length: 200.

extrakey value pair {}

Anything sent here will be sent back as a query string when redirecting the customer back to the merchant website. Must be valid JSON.

Required

amount string

result string

Payment status, which can be "success", "canceled", "failed" or "error".

reference_number string

Ottu unique identifier.

order_no string

customer_first_name string Required, if present in inbound payload

customer_last_name string Required, if present in inbound payload

customer_phone string Required, if present in inbound payload

customer_email string Required, if present in inbound payload

customer_address_line1 string Required, if present in inbound payload

customer_address_line2 string Required, if present in inbound payload

customer_address_city string Required, if present in inbound payload

customer_address_state string Required, if present in inbound payload

customer_address_postal_code string Required, if present in inbound payload

customer_address_line2 string Required, if present in inbound payload

vendor_name string Required, if present in inbound payload

Optional

currency_codestring

message string

Error message in case of a failed payment.

bulk_id string

Merchant sends a request to the API endpoint

​https://pay.{yourdomain}/pos/d/crt/​

where Ottu is installed.

{
   "gateway_code":"kpay",
   "currency_code":"KWD",
   "amount":"3",
   "order_no":"Cust001",
   "full_name":"Saifuddin Tahir",
   "customer_email":"​saifuddin@kuwaitnet.com​",
   "customer_phone":"96597117060",
   "initiator":"2",
   "disclosure_url":"​http://postapp.knpay.net/disclose_ok/"
}

Ottu will respond back the Payment transaction details in POST request to this URL ​disclosure_url​ specified by the merchant while initiating the payment request, ​disclosure_url ​should return ​HTTP​ status ​200 ​and Merchant should save the payload in DB, If ​disclosure_url ​doesn’t return​ HTTP ​status​ 200 ​then user will be redirected to Ottu response page and Transaction details will be displayed. Ottu GET to ​redirect_url ​with 2 parameters, ​order_no​ as ​TT01 ​and ​reference_number 45FGX​,​ ​now on ​redirect_url merchant will fetch the data from DB and based on the ​result ​field customer will be redirected to success or failure page (created by Merchant).

{
   "full_name":"Saifuddin Tahir",
   "customer_email":"​saifuddin@kuwaitnet.com​",
   "customer_phone":"96597117060",
   "Gateway_name":"kpay",
   "order_no":"TT01",
   "reference_number":"45FGX",
   "gateway_response":{
      "result":"CAPTURED",
      "postdate":"0531",
      "ref":"715014026964",
      "trackid":"45FGX",
      "tranid":"1870568381471500",
      "udf1":"TT01",
      "udf3":"Saifuddin Tahir",
      "udf2":"​saifuddin@kuwaitnet.com​",
      "eci":"7",
      "responsecode":"00",
      "paymentid":"8972815371471500",
      "auth":"442382",
      "udf4":"96597117060"
   },
   "amount":"3.000",
   "result":"success",
   "gateway_account":"kpay",
   "currency_code":"KWD"
}

Last updated