Skip to main content

Development preparation

Register an account.

If a third-party system wants to access the payment system, the developer must register as an organization (merchant or distributor) in the system. When registering, you need to provide the following information: mobile phone number, abbreviation, full name, name and mobile phone number of the organization contact person, business scope of the organization, and merchant address. The above information is mandatory. Offline registration: The resident party provides necessary information to the platform party by email. After the registration is complete, the resident party will receive an email containing the information required for payment integration. Online registration: The registered party registers online through the Merchant portal. After the registration is approved, the registered party logs in to the Merchant platform to view related information or consults by email.

Subscribe to products

A developer can subscribe to a payment product before submitting an organization application. Once approved by the MMO, the organization can use the selected payment products.

Exchange keys

After registering as an organization in the payment system, the platform party will integrate the necessary information for payment. (Merchant App Id, Merchant Short Code, App Secret, and Fabric App Id) Send to the resident. The third-party system needs to generate two pairs of RSA public and private keys for the test environment and production environment. and sends the RSA public key to the platform. You can use the Linux shell command to generate the RSA public/private key pair, or download and use the 7.1 Signing tool to generate.

 Generate the RSA private key. openssl genpkey -algorithm RSA -pkeyopt rsa_keygen_bits:2048 -out private-key.pem  Generate the corresponding RSA public key. openssl pkey -in private-key.pem -out public-key.pem -pubout

Keep your private key safe and do not share it with others.

Interface Signing

 Signature algorithm: SHA256withRSA  Fill mode: PSS  Parameters not involved in the signature: null parameters, sign, sign_type, and biz_content  rawRequest: Assume that the request parameter set is M (including the parameters under biz_content). First, exclude the parameters that are not involved in the signature, sort the remaining parameters in ascending order of ASCII codes of parameter names, and combine the parameters in the format of URL key-value pairs. key1=value1&key2=value2...) Obtain the original character string rawRequest. Pay special attention to the following important rules: − The parameter names are sorted by ASCII code in ascending order (lexicographic order). − If the value of a parameter is empty, the parameter is not involved in the signature. − Parameter names are case-sensitive. − Use the ampersand (&) symbol to connect parameters. Example of rawRequest for creating an order: "appid=1072905731584000&business_type=BuyGoods&merch_code=200001&merch_order_id=201907161732001&method=payment.preorder&nonce_str=fcab0d2949e64a69a212aa83eab6ee1d¬ify_url=http://test.payment.com/notify&redirect_url=http://test.payment.com/redirect&timeout_express=120m×tamp=1535166225&title=iphone1&total_amount=12&trade_type=Checkout&trans_currency=ETB&version=1.0" Example of rawRequest for querying an order: "appid=1072905731584000&merch_code=200001&merch_order_id=201907161732001&method=payment.queryorder&nonce_str=5K8264ILTKCH16CQ2502SI8ZNMTM67VS×tamp=1535166225&version=1.0"