Skip to main content

Quick Start

Environment

tip

Lianlian thai payment provides two environments, one is a sandbox, and the other is online formal environment. The sandbox is provided for merchants to debug and test, formal environment will be qualified after complete debugging in sandbox env.

Payment Gateway

Merchant Portal

Specification

tip

All messages between lianlian and merchant are communicated through POST/GET of HTTP protocol. The Content-Type of POST request is application/json, and encoding is UTF-8.

Request Header

FieldTypeLengthRequiredDescription
sign_typestring3truedigital signature type, fixed value: RSA
signstring128truedigital signature
Content-Typestring32truefixed value: application/json

General Response Body

FieldTypeLengthRequiredDescription
codeint6true6 digits, see Response Code
messagestring128trueresponse message
data--falsedata structure, no value if code is not 200000
trace_idstring16truetrace id, just like '2451cac2ef079401'

Security

tip

The interface signature generation algorithm is SHA1withRSA

Bandwidth Dashboard Example


info

👉 Intructions

  1. The above figure shows the principle of signing and checking. The described scenario is the process of the merchant server initiating repeated open interface requests
  2. According to the api signature assembly rules and parameter signature assembly rules, the parameters are signed with the merchant's private key to generate a digital signature
  3. The merchant saves the private key itself, and the public key is saved to Lianlian through the merchant station (merchant public key maintenance) function
  4. Lianlian open interface access, the signature and parameters need to be transmitted at the same time, Lianlian received the request will use the merchant saved to Lianlian public key and received plaintext parameters for signature verification
  5. After the verification is passed, the business logic will be executed, and the result will be returned after the execution of the business logic. The result consists of two parts, one is the business result, and the other is the signature parameter in the return head
  6. The signature parameter returned to head is constructed from the service return result and signed using the private key of the company
  7. After the merchant receives the open return result, it uses the plaintext return parameters and the link public key (obtained by the link public key of the merchant station) to compare and check the returned signature