Access Basic

Interface domain name

1 TENN API Overview

Agreement

The following rules must be followed when the merchant accesses the TENN payments and requests the API

  • Transmission method: HTTPS transmission is used to ensure transaction security.
  • Submission method:POST
  • Data Format:Both submitted and returned data are in Json format.
  • Character encoding:UTF-8 Character encoding
  • Signature Algorithm:MD5/SHA1WithRSA
  • Signature Requirements:Signature verification is required for both requested and received data. For more information, see signature algorithm in security specification.
  • Judgment logic:First determine the return of the protocol field, then determine the return of the business, and finally determine the transaction status.
  • Amount agreement:The payment amount defaults to the smallest unit of the local currency, and the request parameter does not have a decimal point.

Server Address

Environment Server Address
TEST https://tenn.deepxin.com
LIVE https://www.tenn.com

2 TENN SDK

​ We have implemented a backend SDK in Java to ensure merchants could easily integrate with The System. The SDK encapsulates all the data encryption/decryption and HTTP communications. With simple configuration, merchants can complete the integration in 2 simple Java API calls. Here we will introduce the related concepts and SDK configuration steps.

​ To obtain TENN SDK, merchants will receive an email from TENN containing the public key, private key, and the SDK in JAR format. It's important to note that the SDK is not available in public dependency repositories; therefore, merchants are required to manage the JAR file themselves. We recommend that merchants upload the JAR to their private dependency repository. The current SDK version is 1.0.0.

​ TENN SDK requires 4 parameters to work, including the private and public keys sent in the email mentioned above, the merchant code (obtained after offline registration), and the server URL. Once these parameters are configured, merchants can invoke the underlying SDK Java APIs. For detailed implementation guidance, please refer to the code demos in Chapter 5.4.1 and 5.4.2.

​ It is crucial to highlight that the public and private keys are foundational to cryptographic security. Merchants must ensure the confidentiality and secure storage of the private key, which is used for generating digital signatures and decrypting data. On the other hand, the public key is employed for verifying digital signatures and encrypting data.

3 Restful

​ If you find it inconvenient to use the SDK method, you can also use the RESTful mode for connection.

​ This approach requires you to implement encryption, decryption, signature generation, and signature verification on your own.It will be introduced in detail in the encryption and decryption section.

4 Common

Common Request Parameters

PARAMETER TYPE DESCRIPTION EXAMPLE
merchantCode String Merchant code 1001
publicKey String Public key
privateKey String Private key
serverAddress String TENN server address htts://tenn.deepxin.com

Common Response

PARAMETER TYPE DESCRIPTION
code int
msg String
data
sign String Signature encryption

Response code

CODE MESSAGE DESCRIPTION
100000 Success. Request successful
100001 Service error. Service disruption caused by a system error
100003 The request is too frequent. Please try again later. The request is too frequent
20013 Merchant code is required. Request parameter must include the merchant code
20292 Merchant does not exist. No merchant information found based on the merchant code
20340 Product status is not open. The merchant has not activated TENN's payment products
20343 Merchant order ID is required. Request parameter must include the Merchant order ID
20348 Merchant order ID already exists. There is already a transaction with the same merchant order ID
20358 Merchant userId is required. Unique identifier for the merchant's customer is required for the payment
20409 Merchant frontend callback URL is required. To complete the frontend callback, merchant URL is required