API Wallet recharge

Step 1: Retrieving User ID from the URL 

When initiating wallet recharge, EasySocial appends a unique user ID to the wallet recharge URL(provided by the partner). This ID is specific to each user and looks like this.  
Learn how to setup custom Wallet recharge URL.

https://your-partner-url.com/wallet_recharge?user_id=123456

OR 

if you have saved the user id during the account setup process, you may use the same id to proceed to the next step. Learn how to get a user id.

Step 2 : The user will then proceed further with the payment of the amount that needs to be added to the wallet for recharge. Once the payment is confirmed, two APIs must be triggered sequentially to complete the wallet recharge process.

Step 3: Wallet Recharge Auth API 

This API generates a new signature that is required for the wallet recharge process. The signature is valid for a limited time and must be used in the next step.

GET

https://partners-api.easysocial.in/:userId/wallet-recharge-auth


:userId - This field needs to be updated with the user id.

Sample header payload

{
    "token":"466d2e086a8f4f24bcb70789fee"
}


Step 4 : Wallet recharge API 

Once the signature is generated, use it to trigger the Wallet Recharge API. This API adds the selected amount to the user's wallet, completing the recharge process.

GET

https://partners-api.easysocial.in/:userId/wallet-recharge?signature=eyJtZXNzYWdlIjoiL2FwaS8zNTY3L3dhbGxldC1yZWNoYXJnZSIsImV4cGlyeURhdGUiOiIyMDI0LTA1LTMxVDEzOjA4OjQ5LjQ5NFoifQ.AtkYmUEMPZGUk5OODlNH15JAYC9LjnsKLaX4_v7YUIs


Sample header payload

{
    "token":"466d2e086a8f4f24bcb70789fee"
}


Sample response:

{
    "amount":10,
    "remark":"wallet recharge using public api",
    "token":"466d2e086a8f4f24bcb70789fee",
    // mode is live or sandbox
    "mode":"sandbox"
}


Key Parameters

  1. Amount: The amount required for recharge of the wallet as chosen by the user.
  2. Remark: you can use remark to add a comment related to the payment added to wallet. Eg. "Money added to the wallet", "Money added by UPI" etc.
  3. Token: The "Partner API access token" to authenticate the request 
  4. UserId: User Id is a unique identifier given by EasySocial for each user.
  5. Mode:  
    Sandbox Mode: Used for testing. Any users created in this mode are temporary and will be removed within 72 hours.  
    Live Mode: This is the production mode, where all users and changes are permanent.