# H5 Authorization

H5 application get user authorization

1. Provide the authorization link to users.

The authorization link is concatenated with Basic URL+notify_url+reference_id+source+sign_key

Parameter Explaination Example value
notify_url the url that used to receive notification https://www.transfersmile.com
reference_id merchant user's id. Defined by merchant 20220101123
source a string which can recognize the merchant transfersmile
sign_key a key used for verifying signature. Defined by merchant test_key

TIP

Don't put # sign in the URL

Users will be redirected to this page to authorize.

2. Users authorize and the merchant gets UUID.

After users authorized on the page from Step 1. Users will be redirected to the notification page. The page URL will be concatenated with notify_url+merchant_user_id+pagsmile_id+phone_number+sign

Parameter Explaination Example
merchant_user_id the reference_id is provided in step 1.
pagsmile_id user's UUID
phone_number phone number
sign signature generated with sign key. sign_key is provided in step 1.

Signature rule:

let param = 'merchant_user_id=' + reference_id + '&pagsmile_id=' + uuid + '&phone_number' + phone_number;
let sign = param + '&key=' + sign_key;
sign = md5(md5(sign));

Example of the URL of notification page

https://www.transfersmile.com/?merchant_user_id=1234567&pagsmile_id=b5e8b5d94bbafdd7be8d91e784a7413d&phone_number=177****1868&sign=4b7841cf03c6011d2137b99a20f82d61


3. Merchant needs to link merchant's user ID with the UUID of transfersmile wallet. Then users can be redirected to the other page as needed.