Skip to main content

Register Merchant(V2)

POST 

/api/entry/addmerchant/v2

Through this API, institutions or merchants can submit merchant information to create a merchant.

Precautions for Using This API:

  1. out_merchant_no is the unique identifier for the merchant within the institution's/merchant's internal system. PayCloud will check whether the out_merchant_no already exists; if it exists, the merchant information will be updated, and if it does not exist, a new merchant will be created.
  2. out_store_no is the unique identifier for the store within the institution's/merchant's internal system. PayCloud will check whether the out_store_no already exists; if it exists, the store information will be updated, and if it does not exist, a new store will be created.
  3. This interface can be used to register merchant KYC, contact information, merchant super administrator, store, and terminal information. It can also automatically sign an electronic acquiring agreement, configure the signing fee rate, set payment parameters such as MID and TID, and automatically enable the POS cashier application. It also opens settlement and sets up the settlement account.
  4. After the merchant registration application is successful, you will receive the merchant_no and store_no parameters, which are unique identifiers assigned by the PayCloud system. Please save them in the institution's/merchant's system and establish a relationship with the internal system's merchant/store.
Here is a Java code example
// Set application parameters and keys
private static final String APP_RSA_PRIVATE_KEY = "MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQCqYYFrbdXFhOv3zEo4fmORUmYKsadE/QMJhD5kGzthsfwvMoqJHzN41rrGWOp4ljL64elsd2amgnEkWi8ImtV9hS4IKLft/Lq0oP5OBUvbqldaG6KX5wjq7Q11W7Ec5/tSX0IdAtV++UaO/IJyydn2JNZjspeSxbUuE+cymGs9sXtO5s5wRQmeJWv3VhDzQMj8N0ptD2dVvoFkKZ7lbnpNo9ULwAn2oVQgLrmEv/R+TEZPiAcCIhcez4eimY9i6ucTcj4I9liUeTgydAnNAesQZDCt3qQyfl8EZvfWtCUVVbin4uiYsxbzcFSW3q0q27fLsruPRGf+XHnjbR4438MpAgMBAAECggEAMo4YDr5abe9Q7QgLBdRKyvX+HTI1hbzlR8+bi6yg5A4h3AdNH/7IERT1+qCrgfhfTB34WxzaspGF7Nltl0oKCuKXlAgw+0bAR5R1oMTli1px7OTCS/xbowmPssDwPrl+0yQ8w8rxemmQzCCUvGa0a9rmWlLFsuFDL1b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"MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA2m4nkQKyQAxJc8VVsz/L6qVbtDWRTBolUK8Dwhi9wH6aygA6363PVNEPM8eRI5W19ssCyfdtNFy6DRAureoYV053ETPUefEA5bHDOQnjbb9PuNEfT651v8cqwEaTptaxj2zujsWI8Ad3R50EyQHsskQWms/gv2aB36XUM4vyOIk4P1f3dxtqigH0YROEYiuwFFqsyJuNSjJzNbCmfgqlQv/+pE/pOV9MIQe0CAdD26JF10QpSssEwKgvKvnXPUynVu09cjSEipev5cLJSApKSDZxrRjSFBXrh6nzg8JK05ehkI8wdsryRUneh0PGN0PgYLP/wjKiqlgTJaItxnb/JQIDAQAB";

private static final String APP_ID = "wz715fc0d10ee9d156";

private static final String SANDBOX_GATEWAY_URL = "https://wiseasy-open.sg.wisepaycloud.com";

// Instantiate a client
OpenApiClient openapiClient = new OpenApiClient(APP_ID, SANDBOX_GATEWAY_URL, APP_RSA_PRIVATE_KEY, GATEWAY_RSA_PUBLIC_KEY);

// Build a request object, set parameters
MerchantOnboardingV2Request request = new MerchantOnboardingV2Request();
request.setInstitution_no("100012278");
request.setOut_merchant_no("M20240828-002");
request.setMerchant_name("Luxeed");
request.setMerchant_full_name("Chery Automobile Co., Ltd.");
request.setMerchant_type("Enterprise");
request.setRegistration_certificate_number("B123456789");
request.setRegistration_certificate_date("2039-12-31");
request.setPrincipal_name("Yin Tongyue");
request.setPrincipal_id_number("513022198671812571");
request.setPrincipal_certificate_date("2059-10-31");
request.setMcc("5511");
request.setCountry("ZAF");
request.setCity("Mafikeng");
request.setAddress_detail("123 Nelson Mandela Drive");
request.setSales_employee_email("merchantonboarding@addpay.africa");
request.setBusiness_type("Both");
request.setContact_name("Leeka Jin");
request.setContact_email("leeka@gmail.com");
request.setContact_phone("27 820000000");
request.setCreate_super_admin(true);

JSONArray store_list = new JSONArray();
JSONObject store_obj = new JSONObject();
store_obj.put("out_store_no", "S100001");
store_obj.put("store_name", "New York Times Square Flagship Store");
store_obj.put("store_address_detail", "1235 Broadway New York, NY 10001");
JSONArray terminal_list = new JSONArray();
JSONObject terminal_obj = new JSONObject();
terminal_obj.put("terminal_sn", "P52024082800001");
terminal_list.add(terminal_obj);
JSONObject terminal_obj2 = new JSONObject();
terminal_obj2.put("terminal_sn", "P72024082800001");
terminal_list.add(terminal_obj2);
JSONObject terminal_obj3 = new JSONObject();
terminal_obj3.put("terminal_sn", "P72024082800002");
terminal_list.add(terminal_obj3);
store_obj.put("terminal_list", terminal_list);
store_list.add(store_obj);
request.setStore_list(store_list.toJSONString());

JSONObject settlement = new JSONObject();
settlement.put("is_settle_by_paycloud", true);
settlement.put("settlement_mode", 1);
JSONObject settlement_account = new JSONObject();
settlement_account.put("account_no", "1007651671");
settlement_account.put("account_holder", "jossei");
settlement_account.put("account_branch", "African Bank");
settlement.put("settlement_account", settlement_account);
request.setSettlement(settlement.toJSONString());

request.setOpen_vat(true);

JSONArray acquiring_contract_list = new JSONArray();
JSONObject acquiring_contract_obj = new JSONObject();
acquiring_contract_obj.put("pay_channel_id", "PC0132ZAF");
acquiring_contract_obj.put("settlement_cycle", "T+1");
acquiring_contract_obj.put("mdr_id", "100000");
acquiring_contract_list.add(acquiring_contract_obj);

JSONObject acquiring_contract_obj2 = new JSONObject();
acquiring_contract_obj2.put("pay_channel_id", "PC0121ZAF");
acquiring_contract_obj2.put("settlement_cycle", "T+1");
acquiring_contract_obj2.put("mdr_id", "100000");

JSONArray merchant_parameter_list = new JSONArray();
JSONObject merchant_parameter_obj = new JSONObject();
merchant_parameter_obj.put("param_key", "pc_merchant_no");
merchant_parameter_obj.put("param_value", "000016177618901");
merchant_parameter_list.add(merchant_parameter_obj);
acquiring_contract_obj2.put("merchant_parameter_list", merchant_parameter_list);

JSONArray terminal_parameter_list = new JSONArray();
JSONObject terminal_parameter_obj = new JSONObject();
terminal_parameter_obj.put("terminal_sn", "P52024082800001");
terminal_parameter_obj.put("param_key", "pc_terminal_no");
terminal_parameter_obj.put("param_value", "78718967");
terminal_parameter_list.add(terminal_parameter_obj);
JSONObject terminal_parameter_obj2 = new JSONObject();
terminal_parameter_obj2.put("terminal_sn", "P72024082800001");
terminal_parameter_obj2.put("param_key", "pc_terminal_no");
terminal_parameter_obj2.put("param_value", "78718960");
terminal_parameter_list.add(terminal_parameter_obj2);
JSONObject terminal_parameter_obj3 = new JSONObject();
terminal_parameter_obj3.put("terminal_sn", "P72024082800002");
terminal_parameter_obj3.put("param_key", "pc_terminal_no");
terminal_parameter_obj3.put("param_value", "78718961");
terminal_parameter_list.add(terminal_parameter_obj3);
acquiring_contract_obj2.put("terminal_parameter_list", terminal_parameter_list);

acquiring_contract_list.add(acquiring_contract_obj2);
request.setAcquiring_contract_list(acquiring_contract_list.toJSONString());

JSONArray payment_app_list = new JSONArray();
JSONObject payment_app_obj = new JSONObject();
payment_app_obj.put("app_id", "wzac09fb2b0ad16b28");
payment_app_list.add(payment_app_obj);
JSONObject payment_app_obj2 = new JSONObject();
payment_app_obj2.put("app_id", "wz08f13a49cb8d59a1");
payment_app_list.add(payment_app_obj2);
request.setPayment_app_list(payment_app_list.toJSONString());

request.setStatus(1);
request.setE_account_status(1);

MerchantOnboardingV2Response response;
try {
// Execute the request
response = openapiClient.execute(request);
} catch (OpenApiException e) {
// Handle network exceptions ......
// @TODO
System.err.println("\nrequest api error:" + e.getErrCode() + "->>" + e.getErrMsg());
return;
}
if (!response.isSuccess()) {
// Handle business exceptions ......
// @TODO
System.err.println("\napi execute error: " + JSON.toJSONString(response));
}

// Write your business code based on the API response ......
// @TODO

Request

Responses

success

Response Headers