Foreword

Confidentiality and Disclaimer

For Enterprises

signup

This api is for signup.


REST


Headers

FieldsTypeDescriptionExampleO/MData Management
URLstring/v1/signupM
METHODstringPOSTM
content-typestringJSONapplication/jsonM

Request

{
"name":"Aml98765",
"first_name":"amalrag125474",
"last_name":"c",
"mobile":"+919754333775",
"landline":"+918914623795",
"password":"amalRag1@12",
"email":"amalragweb85248@gmail.com",
}


Success

{
   "kyc": [],
   "_id": "601bc5776c2e8a454b8073a5",
   "first_name": "amalrag125474",
   "last_name": "c",
   "mobile": "+919754333775",
   "email": "amalragweb85248@gmail.com",
   "company": "601bc5776c2e8a95b18073a3",
   "user": "601bc5776c2e8a761b8073a4",
   "entityId": "601bc5776c2e8a454b8073a5",
   "__v": 0
}


Error

{
    "error": "123456789 is not a valid phone number!"
}

Approve/Reject Admin assigned to User

This api approve/reject admin assigned to User


REST


Headers

FieldsTypeDescriptionExampleO/MData Management
URLstring/v1/pending_users/<user_id>M
METHODstringPUTM
content-typestringJSONapplication/jsonM
x-access-tokenstringSession token with validitytokenM

Request

Approve

{
    "approval_status":"approved"
}

disapprove

{
    "approval_status":"disapproved"
}

Response

 {
  "n": 1,
  "nModified": 1,
  "opTime": {
    "ts": "6928287237817761793",
    "t": 6
  },
  "electionId": "7fffffff0000000000000006",
  "ok": 1,
  "operationTime": "6928287237817761793",
  "$clusterTime": {
    "clusterTime": "6928287237817761793",
    "signature": {
      "hash": "ZfgXPCU5RpuKWrIa0AwN+EhmN70=",
      "keyId": "6894751050838835201"
    }
  }
}

Error

{ 
    "error": 'The user has not verified his/her email' 
}

Verify admin email

This api Verify admin email


REST


Headers

FieldsTypeDescriptionExampleO/MData Management
URLstring/v1/authenticate/verify_emailM
METHODstringPOSTM
content-typestringJSONapplication/jsonM
x-access-tokenstringSession token with validitytokenM

Request



Success



Error


Verify user email mobile

This api is for otp verification


REST


Headers

FieldsTypeDescriptionExampleO/MData Management
URLstring/v1/employees/<emp_id>/resend_otp_emailM
METHODstringPOSTM
content-typestringJSONapplication/jsonM
x-access-tokenstringSession token with validitytokenM

Request



Success



Error


Verify user email only

This api verify user email only


REST


Headers

FieldsTypeDescriptionExampleO/MData Management
URLstring/v1/employees/<emp_id>/resend_verificationM
METHODstringPOSTM
content-typestringJSONapplication/jsonM
x-access-tokenstringSession token with validitytokenM

Request



Success



Error


Update user/admin email if card kit not activated

This api Update user/admin email if card kit not activated.


REST


Headers

FieldsTypeDescriptionExampleO/MData Management
URLstring/v1/authenticate/update/emailM
METHODstringPUTM
content-typestringJSONapplication/jsonM
x-access-tokenstringSession token with validitytokenM

Request



Success

{

"email":"newEmail@xyz.com"
}


Error



The above request will send a verification link to the new email address to verify the ownership of the email.


Fetch user details

This api Fetch user details


REST


Headers

FieldsTypeDescriptionExampleO/MData Management
URLstring/v1/auth_userM
METHODstringGETM
content-typestringJSONapplication/jsonM
x-access-tokenstringSession token with validitytokenM

Request



Success

{
    "_id": "5936b287ef91xxxxxxxxxxxx",
    "username": "employee@test.com",
    "email_verification": "approved",
    "roles": [
        "company",
        "employee"
    ]
}


Error


Add role to user

This api Add role to user


REST


Headers

FieldsTypeDescriptionExampleO/MData Management
URLstring/v1/users/roles/addM
METHODstringPUTM
content-typestringJSONapplication/jsonM
x-access-tokenstringSession token with validitytokenM

Request

{
    "role": "company/employee/account_reviewer",
    "user": "\<user_id\>"
}


Success




Error


Remove role from user

This api is for Removing role from user


REST


Headers

FieldsTypeDescriptionExampleO/MData Management
URLstring/v1/users/roles/removeM
METHODstringPUTM
content-typestringJSONapplication/jsonM
x-access-tokenstringSession token with validitytokenM

Request

{
    "role": "company/employee/account_reviewer",
    "user": "\<user_id\>"
}


Success




Error


User login with OTP

This api is for User login with OTP


REST


Headers

FieldsTypeDescriptionExampleO/MData Management
URLstring/v1/otp/loginM
METHODstringPOSTM
content-typestringJSONapplication/jsonM
x-access-tokenstringSession token with validitytokenM

Request

{
            "mobile": "919891055605",
            "otp": "xxxx"
}


Success

{
    "token":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyIjoiNTk3MDVkNmUzZDUzMmFjMDEs"
}


Error

{
    "error": "message"
}

Above api will return a valid token only if the user has already attached his mobile number to his paysack account by clicking the link in the Welcome email.


Change password if logged in

This api Change password if logged in


REST


Headers

FieldsTypeDescriptionExampleO/MData Management
URLstring/v1/authenticate/changePasswordM
METHODstringPUTM
content-typestringJSONapplication/jsonM
x-access-tokenstringSession token with validitytokenM

Request

{
"oldpassword":"xxxxx",
"password":"yyyyy",
"repassword":"yyyyy"
}


Success




Error


Forgot password if unable to log in

This api is for Forgot password if unable to log in


REST


Headers

FieldsTypeDescriptionExampleO/MData Management
URLstring/v1/authenticate/forgotPasswordM
METHODstringPOSTM
content-typestringJSONapplication/jsonM
x-access-tokenstringSession token with validitytokenM

Request

{
"email":"abc@xyz.com"
}


Success

{"success": true}


Error

{"error":"Error message"}

Fetch logged in user details

This api Fetch logged in user details


REST


Headers

FieldsTypeDescriptionExampleO/MData Management
URLstring/v1/employees/meM
METHODstringGETM
content-typestringJSONapplication/jsonM
x-access-tokenstringSession token with validitytokenM

Request



Success

{
           "_id": "54da47cfefa0c9420757e0e4",
           "__v": 0,
            "first_name":"abc",
            "last_name":"xyz",
            "gender": "male",
            "email": "employee@test.com",
            "mobile": "+919891055604",
            "employee_id":"843778",
            "company":"12da47cfe33442420757e0e4"
}


Error


Fetch user profile with kit details

This api Fetch user profile with kit details


REST


Headers

FieldsTypeDescriptionExampleO/MData Management
URLstring/v1/employees/profiles?param1=value1M
METHODstringGETM
content-typestringJSONapplication/jsonM
x-access-tokenstringSession token with validitytokenM

Request



Success


[
    {
        "_id": "59b5174628d8fc0001d803be",
        "email": "rajat@delvelogic.com",
        "mobile": "+919891055604",
        "first_name": "Rajat",
        "last_name": "Talwar",
        "company": "59b5174628d8fc0001d803bb",
        "user": {
            "_id": "59b5174628d8fc0001d803bd",
            "email_verification": "approved",
            "phone_verification": "approved"
        },
        "entityId": "rajat-talwar",
        "kyc": [],
        "roles": [],
        "__v": 0,
        "kyc_details": {
            "_id": "5a965c354342690001b8f3e4",
            "approval_status": "approved",
            "countryofIssue": "IND",
            "idNumber": "908385555040",
            "idType": "AADHAR",
            "verifiedByUser": true
        },
        "kit": {
            "_id": "59b631b055e4d1ee3820a6f4",
            "entityId": "rajat-talwar",
            "dependent": false,
            "emailAddress": "rajat@delvelogic.com",
            "contactNo": "+919891055604",
            "lastName": "Talwar",
            "firstName": "Rajat",
            "entityType": "CUSTOMER",
            "businessType": "PAYSACK",
            "businessId": "+919891055604",
            "employee": "59b5174628d8fc0001d803be",
            "pincode": "110027",
            "state": "Delhi",
            "city": "Delhi",
            "country": "India",
            "gender": "M",
            "address": "b-4/8 rajouri garden",
            "specialDate": "1987-07-26",
            "kitNo": "000000288581",
            "__v": 0,
            "verifiedByUser": true,
            "expense_synced": true,
            "created_ts": 1527059407143,
            "isPinSet": false
        }
    }
]


Error


Fetch single user with kit

This api Fetch single user with kit


REST


Headers

FieldsTypeDescriptionExampleO/MData Management
URLstring/v1/employees/profiles/<emp_id>M
METHODstringGETM
content-typestringJSONapplication/jsonM
x-access-tokenstringSession token with validitytokenM

Request



Success




Error


Admin to Create bulk users for an organisation

This api is for Admin to Create bulk users for an organisation


REST


Headers

FieldsTypeDescriptionExampleO/MData Management
URLstring/v1/employees/bulkM
METHODstringPOSTM
content-typestringJSONapplication/jsonM
x-access-tokenstringSession token with validitytokenM

Request

{
            "emails":["abc@xyz.com","def@xzy.com"]

}


Success

[{
  "email":"abc@xyz.com",
  "success":true
},
{
  "email":"def@xyz.com",
  "success":false,
  "error":"email already registered"
}]


Error


Admin to create single user for an organisation

This api is for Admin to create single user for an organisation


REST


Headers

FieldsTypeDescriptionExampleO/MData Management
URLstring/v1/employeesM
METHODstringPOSTM
content-typestringJSONapplication/jsonM
x-access-tokenstringSession token with validitytokenM

Request

{
           "first_name":"amal",
           "last_name":"rag",
           "gender": "male",
           "email": "amalrag@test.com",
           "mobile": "+919747342495",
           "employee_id":"843778",
}


Success

{
   "kyc": [],
   "_id": "6010fc661616b7418ea5f99a",
   "first_name": "amal",
   "last_name": "rag",
   "gender": "male",
   "email": "amalrag@test.com",
   "mobile": "+919747342495",
   "employee_id": "843778",
   "company": "5fbcb4821ffc64855233b1b1",
   "entityId": "6010fc661616b7418ea5f99a",
   "user": "6010fc661616b7267da5f999",
   "__v": 0
}


Error

{
    "error": "message"
}


"mobile" - it is the responsibility of the client to always send country code with the mobile number, server will not perform any checks "company" : id of the company to be associated with this employee


Admin add external id to user profile

This api is for Admin add external id to user profile


REST


Headers

FieldsTypeDescriptionExampleO/MData Management
URLstring/v1/employees/<employee_id>/external_idM
METHODstringPUTM
content-typestringJSONapplication/jsonM
x-access-tokenstringSession token with validitytokenM

Request

{
   "external_id":"abcxyz-12334"
            
}


Body can contain one or many from these fields

['external_id']


Success

[{
           "_id": "54da47cfefa0c9420757e0e4",
           "__v": 0,
            "first_name":"abc",
            "last_name":"xyz",
            "gender": "male",
            "email": "employee@test.com",
            "mobile": "+919891055604",
            "employee_id":"843778",
            "company":"12da47cfe33442420757e0e4"
}]



Error


Admin filter user profiles

This api if for Admin filter user profiles


REST


Headers

FieldsTypeDescriptionExampleO/MData Management
URLstring/v1/employees?=&=M
METHODstringGETM
content-typestringJSONapplication/jsonM
x-access-tokenstringSession token with validitytokenM

PARAMS


they can be anything from these values


first_name:string
last_name:string
gender?: string
user: string
email: string
mobile: string
roles?: [string]
employee_id:string
company: string

Success

[{
           "_id": "54da47cfefa0c9420757e0e4",
           "__v": 0,
            "first_name":"abc",
            "last_name":"xyz",
            "gender": "male",
            "email": "employee@test.com",
            "mobile": "+919891055604",
            "employee_id":"843778",
            "company":"12da47cfe33442420757e0e4"
}]


Error


Admin to Delete user from an organisation

This api is for Admin to Delete user from an organisation


REST


Headers

FieldsTypeDescriptionExampleO/MData Management
URLstring/v1/employees/<employee_id>M
METHODstringDELETEM
content-typestringJSONapplication/jsonM
x-access-tokenstringSession token with validitytokenM

Request



Success



Error


Initiate a Reimbursement request

This api Initiate a Reimbursement request


REST


Headers

FieldsTypeDescriptionExampleO/MData Management
URLstring/v1/company_reimbursementM
METHODstringPOSTM
content-typestringJSONapplication/jsonM
x-access-tokenstringSession token with validitytokenM

In this request , you need to pass _id of a merchant transaction fetched from the above api.


Request

{
    "reimbursement_txn_id": "<merchant_txn_id>",
    "amount" : <claim_amount>

}


amount field is optional


Success



Error


Delete a reimbursement request

This api Undo a Reimbursement request


REST


Headers

FieldsTypeDescriptionExampleO/MData Management
URLstring/v1/company_reimbursement/<merchant_txn_id>M
METHODstringDELETEM
content-typestringJSONapplication/jsonM
x-access-tokenstringSession token with validitytokenM

This will move corresponding comp_emp_txn into pending_submission Also note, any txn in pending_submission or company_disapproved state can be resubmitted and its status will change to pending_approval


Request



Success



Error


Upload supporting merchant bill image/pdf for reimbursement request

This api Upload supporting merchant bill image/pdf for reimbursement request


REST


Headers

FieldsTypeDescriptionExampleO/MData Management
URLstring/v1/filesM
METHODstringPOSTM
content-typestringJSONapplication/jsonM
x-access-tokenstringSession token with validitytokenM

Request



Success




Error


Attach the uploaded image/pdf to reimbursement request id

This api Attach the uploaded image/pdf to reimbursement request id


REST


In this request , you need to pass _id of a merchant transaction in the url. the file url you will get from Upload Bill Image


Headers

FieldsTypeDescriptionExampleO/MData Management
URLstring/v1/merchant_transactions/<txid>/filesM
METHODstringPOSTM
content-typestringJSONapplication/jsonM
x-access-tokenstringSession token with validitytokenM

Request

{
    "files": ["http://xx.com/fileurl1.jpg","http://xx.com/fileurl2.jpg"]

}


Success




Error


Add more information to a reimbursement request id

This api Add more information to a reimbursement request id


REST


Headers

FieldsTypeDescriptionExampleO/MData Management
URLstring/v1/merchant_transactions/<txid>M
METHODstringPUTM
content-typestringJSONapplication/jsonM
x-access-tokenstringSession token with validitytokenM

Request

{
     "description": "test description",
     "tags": ["office", "delhi"],
     "isCompany":true

}


Success



Error



In this request , you need to pass _id of a merchant transaction in the url. isCompany field is of boolean type


Admin review of a reimbursement request

This api is for Admin review of a reimbursement request


REST


Headers

FieldsTypeDescriptionExampleO/MData Management
URLstring/v1/comp_emp_txns/claimReview/<txn_id>M
METHODstringPUTM
content-typestringJSONapplication/jsonM
x-access-tokenstringSession token with validitytokenM

Body Stage For Review

{
        "approval_status": "company_reviewed",
        "amount": <amount_set_by_reviewer>,
        "comment":"reviewer comments"
}


Success



Error



this can be done by company admin ,super admin , claim_reviewr


Admin add comment on a transaction

This api is for Admin to add comment on a transaction


REST


Headers

FieldsTypeDescriptionExampleO/MData Management
URLstring/v1/comp_emp_txns/<txn_id>/comments/M
METHODstringPOSTM
content-typestringJSONapplication/jsonM
x-access-tokenstringSession token with validitytokenM

Request

{
        "comment":"reviewer comments"
}


Success




Error


Admin approve reimbursement but no settle amount

This api is for Admin approve reimbursement but no settle amount


REST


Headers

FieldsTypeDescriptionExampleO/MData Management
URLstring/v1/comp_emp_txns/claimReview/<txn_id>M
METHODstringPUTM
content-typestringJSONapplication/jsonM
x-access-tokenstringSession token with validitytokenM

Body For Company Approval/Internal settlement

{
        "approval_status": "company_approved",
        "amount": <amount_set_by_reviewer>,
        "comment":"reviewer comments"
 }

Body For Company_Disapproved - this is not final Disapproval

{
        "approval_status": "company_disapproved",
        "comment":"disapprove comments"

}


Success



Error



this only marks the txn as company_reivewed and does not participates in wallet calculation .This can be done by company admin ,super admin , claim_reviewer


Admin actions on a reimbursement request

This api is for Approve/Settle/Disapprove


REST


Headers

FieldsTypeDescriptionExampleO/MData Management
URLstring/v1/comp_emp_txns/<txn_id>M
METHODstringPUTM
content-typestringJSONapplication/jsonM
x-access-tokenstringSession token with validitytokenM

Body For Approval/Settlement

{
        "approval_status": "internally_approved",
        "amount":<amount_set_by_settler>,
        "comment":"settler comments"

}

Body Disapprove

{
        "approval_status": "disapproved"
}


Success



Error



this can be done by company admin ,super admin only


Resize an image file

This api Resize an image file


REST


Headers

FieldsTypeDescriptionExampleO/MData Management
URLstring/v1/files/<file_id>?size=200x200M
METHODstringGETM
content-typestringJSONapplication/jsonM
x-access-tokenstringSession token with validitytokenM

Request



Success

Image will be of size 200 x 200


Error


Activate Bank Card Kit to User

This api activate Bank Card Kit to User


REST


Headers

FieldsTypeDescriptionExampleO/MData Management
URLstring/v1/card-kitM
METHODstringPOSTM
content-typestringJSONapplication/jsonM
x-access-tokenstringSession token with validitytokenM

Request


{
    "entityId": "550000119",
    "entityType": "CUSTOMER",
    "businessType": "EQPAYSACK",
    "businessId": "550000119",
    "countryofIssue": "IND",
    "cardType": "P",
    "kitNo": "880000001",
    "title": "Mr",
    "firstName": "TEST",
    "lastName": "CUSTOMER",
    "gender": "M",
    "specialDate": "1999-09-29",
    "contactNo": "+919000000000",
    "emailAddress": "email@m2p.in",
    "address": "my address, my street",
    "address2": "my locality",
    "city": "mycity",
    "state": "mystate",
    "country": "India",
    "pincode": "600000",
    "idType": "PAN",
    "idNumber": "1234500001",
    "idExpiry": "2020-12-12",
    "kycStatus": "MIN_KYC/FULL_KYC",
    "countryCode": "+91",
    "programType": "EQPAYSACK",
    "documents": [
        {
            " docType ": "PAN",
            " docNo ": "ADOPA89013",
            "docExpDate": null
        },
        {
            " docType ": "PASSPORT",
            " docNo ": "ADOPA89013",
            " docExpDate ": "2025-12-12"
        }
    ],
    "addressDto": {
        "contactNo1": "+919677109523",
        "contactNo2": "+919236634491",
        "emailAddress1": "test@m2p.in",
        "emailAddress2": "test@gmail.com",
        "notification": "1010",
        "address": [
            {
                "title": "PERMANENT,",
                "address1": "Plot 23&23, AG1, Vidhya Apts,",
                "address2": "Vidhya nagar 2nd St",
                "address3": "Ullagaram",
                "city": "Chennai",
                "state": "TamilNadu",
                "country": "India",
                "pinCode": "600091"
            }
        ]
    }
}

{
        "kitNo": "000000222222",
        "employee_id": "598024db0532e4xxxxxxxxxx",
        "last_digits": "0456",
        "specialDate": "1987-07-26",
        "address": "b-4/8 rajouri garden",
        "address2": "2nd floor",
        "gender": "M",
        "isKitRegistered": false,
        "country": "India",
        "city": "New Delhi",
        "state": "New Delhi",
        "pincode": "110027",
        "idType": "PASSPORT/DL/PANCARD/AADHAR",
        "idNumber": "xxxxxxx",
        "countryofIssue": "IND",
        "title":"Mr/Ms"

    }

Success

 

Error

{
    "error": "Kit no 880000001 and last four  digits undefined dont match"
}

Adding `updateOnly:true' field to kit registration payload will update the kit on paysack servers only without hitting the actual m2p servers with registration payload.


Reset Card PIN

This api Reset Card PIN


REST


Headers

FieldsTypeDescriptionExampleO/MData Management
URLstring/v1/card-kit/setPinM
METHODstringPOSTM
content-typestringJSONapplication/jsonM
x-access-tokenstringSession token with validitytokenM

Request

{
        "entityId": "PaysackCust011",
        "pin": "1234",
        "kitNo": "000000220003",
        "expiryDate": "1021",
        "dob": "27071983",
        "send_sms":true
}


Success



Error


Lock Card

This api Lock Card


REST


Headers

FieldsTypeDescriptionExampleO/MData Management
URLstring /v1/card-kit/lockM
METHODstringPOSTM
content-typestringJSONapplication/jsonM
x-access-tokenstringSession token with validitytokenM

Request

{
"entityId": "PaysackCust011", 
"kitNo": "000000220003", 
"flag": "L", 
"reason": "card lost"
}


Success



Error



Lock=”L”, Unlock=”UL”, only lock and unlock supported in the api.


Unlock Card

This api Unlock Card


REST


Headers

FieldsTypeDescriptionExampleO/MData Management
URLstring /v1/card-kit/lockM
METHODstringPOSTM
content-typestringJSONapplication/jsonM
x-access-tokenstringSession token with validitytokenM

Request

{
"entityId": "PaysackCust011", 
"kitNo": "000000220003", 
"flag": "UL", 
"reason": "card lost"
}


Success



Error



Lock=”L”, Unlock=”UL”, only lock and unlock supported in the api.


Block Card

This api Block Card


REST


Headers

FieldsTypeDescriptionExampleO/MData Management
URLstring/v1/card-kit/blockM
METHODstringPOSTM
content-typestringJSONapplication/jsonM
x-access-tokenstringSession token with validitytokenM

Request

{
"entityId": "PaysackCust011", 
"kitNo": "000000220003", 
"flag": "BL", 
"reason": "card lost"
}


Success



Error



Block=”BL” . Read YAP Prepaid Program PAYSACK.pdf for more details


Replace Card

This api Replace Card.


REST


Headers

FieldsTypeDescriptionExampleO/MData Management
URLstring/v1/card-kit/replaceCardM
METHODstringPOSTM
content-typestringJSONapplication/jsonM
x-access-tokenstringSession token with validitytokenM

Request

{
"entityId": "PaysackCust011", 
"oldKitNo": "000000220003", 
"newKitNo": "000000220015",
"last_digits":"1234"
}


Success



Error


Load Funds to Card assigned to User

This api Load Funds to Card assigned to User


REST


Headers

FieldsTypeDescriptionExampleO/MData Management
URLstring/v1/comp_emp_txns/M
METHODstringPOSTM
content-typestringJSONapplication/jsonM
x-access-tokenstringSession token with validitytokenM

Request

{
        "amount": 45,
        "amount_type": "expense",
        "employee": "5936b287ef91b201008c559f"

}


Success

{
  "tags": [],
  "_id": "5ff834fb1f9ffe8f107fecfe",
  "company": "5cb59c503283cf58e011a700",
  "amount": 10,
  "amount_type": "expense",
  "employee": "5cb59c503283cf5b8911a704",
  "txn_type": "topup",
  "approval_status": "internally_approved",
  "initiated_ts": 1610102011,
  "comments": [],
  "__v": 0
}

Error

{
    "error": "Not enough funds"
}

amount_type can be 'expense','food','fuel'


Pullback Funds from Card assigned to User

This api Pullback Funds from Card assigned to User


REST


Headers

FieldsTypeDescriptionExampleO/MData Management
URLstring/v1/comp_emp_txns/refundM
METHODstringPOSTM
content-typestringJSONapplication/jsonM
x-access-tokenstringSession token with validitytokenM

Request

{

"employee":"591aa77660fac001004d4ae7",
"amount_type" : "fuel/expense/food",
"description":"Testing INR 2 refund",
"amount": 2.00

}


Success




Error


Bulk Load Funds to Card assigned to many users

This api Bulk Load Funds to Card assigned to many users


REST


Headers

FieldsTypeDescriptionExampleO/MData Management
URLstring/v1/comp_emp_txns/bulkM
METHODstringPOSTM
content-typestringJSONapplication/jsonM
x-access-tokenstringSession token with validitytokenM

Request

{
        "company": "5932da2ba145ed01004e748d",
        "deposit":[
         {"email":"emp1@xyz.com","amount":45,"amount_type":"food"},
         {"email":"emp2@xyz.com","amount":150,"amount_type":"fuel"}
         ]
    }


Success




Error


Update Card Kit Preferences

This api Update Card Kit Preferences


REST


Headers

FieldsTypeDescriptionExampleO/MData Management
URLstring{base-url}/v1/card-kit/updatePreferencesM
METHODstringPOSTM
content-typestringJSONapplication/jsonM
x-access-tokenstringSession token with validitytokenMemployee token

Request

{
    "type":"POS/ECOM",
    "status":"ALLOWED/NOTALLOWED"
}


Success

{ "statusCode": 200,
  "body": { "result": true, "exception": null, "pagination": null }
}


Error

{ "statusCode": 400,
  "body": { "result": null, "exception": null, "pagination": null }
}


Employee can update the card preferences by selecting a field and updating a status (ALLOWED/NOTALLOWED).


Fetch Card Kit Preferences

Company Admin/Employee can fetch the card preferences that have been set by the bank.


REST


Headers

FieldsTypeDescriptionExampleO/MData Management
URLstring{base-url}/v1/card-kit/preferences?entityId=${entityId}M
METHODstringGETM
content-typestringJSONapplication/jsonM
x-access-tokenstringSession token with validitytokenMcompany/employee token

Request



Success

{
  cardPreferences: {
    address: null,
    contactNo1: null,
    contactNo2: null,
    emailAddress1: null,
    emailAddress2: null,
    notification: null,
    atm: null,
    pos: 'ALLOWED',
    ecom: 'ALLOWED',
    international: null,
    dcc: null,
    contactless: null,
    limit: null,
    cashLimit: null,
    country: null,
    secKitNo: null
  }
}



Error

{
  "cardPreferences": null
}

Send PIN over SMS

This api Send PIN over SMS


REST


Headers

FieldsTypeDescriptionExampleO/MData Management
URLstring/v1/card-kit/assignNewPinM
METHODstringPOSTM
content-typestringJSONapplication/jsonM
x-access-tokenstringSession token with validitytokenM

Request

{
        "entityId": "PaysackCust011",
        "kitNo": "000000220003",
        "expiryDate": "1021",
        "dob": "27071983"
}


Success



Error


Fetch Bank Card Status

This api Fetch Bank Card Status


REST


Headers

FieldsTypeDescriptionExampleO/MData Management
URLstring/v1/card-kit/list?employee=:empIDM
METHODstringGETM
content-typestringJSONapplication/jsonM
x-access-tokenstringSession token with validitytokenM

Request



Success

{
    "cardStatusList": [
        "ALLOCATED"
    ]
}



Error

Employee out of company scope

Get Activated Card Kit Details

This api Get Activated Card Kit Details


REST


Headers

FieldsTypeDescriptionExampleO/MData Management
URLstring/v1/card-kit?key1=value1&key2=value2M
METHODstringGETM
content-typestringJSONapplication/jsonM
x-access-tokenstringSession token with validitytokenM

Request



Success

[
    {
        "_id": "598024db0532e4xxxxxxxxxx",
        "entityId": "598022801c2dxxxxxxxxxxxx",
        "dependent": 0,
        "emailAddress": "vigneshs_id@yahoo.com",
        "contactNo": "+918848009191",
        "lastName": "Prasad",
        "firstName": "Vignesh",
        "entityType": "CUSTOMER",
        "businessType": "PAYSACK",
        "businessId": "+918848009191",
        "specialDate": "1994-04-24",
        "address": "Kailash, Valiyavalappu Kavu Road, Civil Station PO, Kannur",
        "pincode": "670002",
        "city": "Kannur",
        "country": "India",
        "gender": "M",
        "kitNo": "000000222222"
    }
]



Error


For Institutions

Create Members

This api creates members.


GRAPHQL


Headers

FieldsTypeDescriptionExampleO/MData Management
URLstring{base_url}/graphql/loop-members-serviceM
GRAPHQLstringMUTATIONM
content-typestringJSONapplication/jsonM
x-access-tokenstringSession token with validitytokenMadmin token

Request

{
  mutation {
    create_member(
            "first_name":"abc",
            "last_name":"xyz",
            "gender": "male",
            "email": "employee@test.com",
            "mobile": "9891055604",
            "external_id":"843778",
            "password":"password"
    ){
      _id
      success
    }
  }
}

Success

{
  "_id": "54da47cfefa0c9420757e0e4",
  "success": true
}

Error

{
  
}

Initiate Payment to Merchant

this api initiate payment to Merchant


GRAPHQL


Headers

FieldsTypeDescriptionExampleO/MData Management
URLstring{base_url}/graphql/loop-merchant-payments-serviceM
GRAPHQLstringMUTATIONM
content-typestringJSONapplication/jsonM
x-access-tokenstringSession token with validitytokenMMerchant's token

Request

{
  mutation {
    receive_payment(
      member_id: "ABCD1234",
      payer_pin: "0000",
      amount: 100.00,
      amount_type: "expense",
      refNo: "TXN01"
    ){
      _id
      approval_status
      debit_account
      credit_account
      amount
      amount_type
      refNo
      success
    }
  }
}

Success

{
  "_id": "8",
  "approval_status": "approved",
  "debit_account": "ABCD1234",
  "credit_account": "MER01",
  "amount": 100.00,
  "amount_type": "expense",
  "refNo": "TXN01",
  "success": true
}

Error

{
  
}

Initiate Payment to Merchant

this api Fetch Member Using External ID


GRAPHQL


Headers

FieldsTypeDescriptionExampleO/MData Management
URLstring{base_url}/graphql/loop-members-serviceM
GRAPHQLstringQUERYM
content-typestringJSONapplication/jsonM
x-access-tokenstringSession token with validitytokenMadmin token

Request

{
  query: {
    fetch_member(
        external_id: "21"
    ){
      _id
      first_name
      last_name
      gender
      email
      mobile
      external_id
    }
  }
}

Success

{
"_id": "54da47cfefa0c9420757e0e4",
"first_name":"abc",
"last_name":"xyz",
"gender": "male",
"email": "employee@test.com",
"mobile": "+919891055604",
"external_id":"21"
}

Error

{
  
}

Fetch Members Based On Role

this api Get user details for a specific role.


GRAPHQL


Headers

FieldsTypeDescriptionExampleO/MData Management
URLstring{base_url}/ms/graphql/org-admin-serviceM
GRAPHQLstringQUERYM
content-typestringJSONapplication/jsonM
x-access-tokenstringSession token with validitytokenMadmin token

Request

query{
  get_members(company: "5e69deba5cef29842defb0ee", role: "merchant") {
    members {
      company
      _id
      user {
        name,
        username,
        roles
      }
    }
  }
}

Success

"members": [
        {
          "company": "5e69deba5cef29842defb0ee",
          "_id": "5ecc8f9d8bb4b311eb86be7d",
          "user": {
            "name": "M002 Sports",
            "username": "uiazaoxol@pk-loop.loop",
            "roles": [
              "employee",
              "merchant"
            ]
          }
        },
        {
          "company": "5e69deba5cef29842defb0ee",
          "_id": "5e85a1b45cef2944aaefb3c5",
          "user": {
            "name": "merchant6 .",
            "username": "collegemerchant86@paysack.com",
            "roles": [
              "employee",
              "merchant"
            ]
          }
        }
      ]

Error

{
  
}

Initiate Payment to Merchant

this api Create Merchant Transactions


REST


Headers

FieldsTypeDescriptionExampleO/MData Management
URLstring{base_url}/v1/merchant_transactionsM
METHODstringPOSTM
content-typestringJSONapplication/jsonM
x-access-tokenstringSession token with validitytokenMaccess_token

Request



Success



Error

{
  
}

Fetch Merchant Transactions

this api Fetch Merchant Transactions


REST


Headers

FieldsTypeDescriptionExampleO/MData Management
URLstring/v1/merchant_transactionsM
METHODstringPOSTM
content-typestringJSONapplication/jsonM
x-access-tokenstringSession token with validitytokenMaccess_token

Request



Success



Error

{
  
}

Initiate Student to Student Transactions

this api Initiate Student to Student Transactions


GRAPHQL


Headers

FieldsTypeDescriptionExampleO/MData Management
URLstring{base_url}/graphql/loop-merchant-payments-serviceM
GRAPHQLstringMUTATIONM
content-typestringJSONapplication/jsonM
x-access-tokenstringSession token with validitytokenMMerchant's token

Request

{
  mutation {
    receive_payment(
      member_id: "ABCD1234",
      payer_pin: "0000",
      amount: 100.00,
      amount_type: "expense",
      refNo: "TXN01"
    ){
      _id
      approval_status
      debit_account
      credit_account
      amount
      amount_type
      refNo
      success
    }
  }
}

Success

{
  "_id": "8",
  "approval_status": "approved",
  "debit_account": "ABCD1234",
  "credit_account": "MER01",
  "amount": 100.00,
  "amount_type": "expense",
  "refNo": "TXN01",
  "success": true
}

Error

{
  
}

Initiate Student to Merchant Transactions

this api Initiate Student to Merchant Transactions


GRAPHQL


Headers

FieldsTypeDescriptionExampleO/MData Management
URLstring{base_url}/graphql/loop-merchant-payments-serviceM
GRAPHQLstringMUTATIONM
content-typestringJSONapplication/jsonM
x-access-tokenstringSession token with validitytokenMMerchant's token

Request

{
  mutation {
    receive_payment(
      member_id: "ABCD1234",
      payer_pin: "0000",
      amount: 100.00,
      amount_type: "expense",
      refNo: "TXN01"
    ){
      _id
      approval_status
      debit_account
      credit_account
      amount
      amount_type
      refNo
      success
    }
  }
}

Success

{
  "_id": "8",
  "approval_status": "approved",
  "debit_account": "ABCD1234",
  "credit_account": "MER01",
  "amount": 100.00,
  "amount_type": "expense",
  "refNo": "TXN01",
  "success": true
}

Error

{
  
}

Fetch Student Wallet Balance

this api Fetch Student Wallet Balance


GRAPHQL


Headers

FieldsTypeDescriptionExampleO/MData Management
URLstring{base_url}/graphql/loop-merchant-payments-serviceM
GRAPHQLstringQUERYM
content-typestringJSONapplication/jsonM
x-access-tokenstringSession token with validitytokenMMerchant's token

Request

{
  query: {
    member_wallet(
      member_id: "ABCD1234"
    ){
      expense
    }
  }
}

Success

{
"expense": 100
}

Error

{
  
}

Fetch Members Using Mobile Number

this api Fetch Members Using Mobile Number


GRAPHQL


Headers

FieldsTypeDescriptionExampleO/MData Management
URLstring{base_url}/graphql/loop-members-serviceM
GRAPHQLstringQUERYM
content-typestringJSONapplication/jsonM
x-access-tokenstringSession token with validitytokenMadmin token

Request

{
  query: {
    fetch_member(
        mobile: "+919891055604"
    ){
      _id
      first_name
      last_name
      gender
      email
      mobile
      external_id
    }
  }
}

Success

{
"_id": "54da47cfefa0c9420757e0e4",
"first_name":"abc",
"last_name":"xyz",
"gender": "male",
"email": "employee@test.com",
"mobile": "+919891055604",
"external_id":"21"
}

Error

{
  
}

Fetch Student Wallet

this api Fetch Student Wallet


REST


Headers

FieldsTypeDescriptionExampleO/MData Management
URLstring/v1/members/<member_id>/walletM
METHODstringGETM
content-typestringJSONapplication/jsonM
x-access-tokenstringSession token with validitytokenMaccess_token

Request



Success

{
"expense":400

}

Error


Fetch list of transactions for a given date

this api Fetch list of transactions for a given date


GRAPHQL


Headers

FieldsTypeDescriptionExampleO/MData Management
URLstring{base_url}/graphql/loop-merchant-payments-serviceM
GRAPHQLstringQUERYM
content-typestringJSONapplication/jsonM
x-access-tokenstringSession token with validitytokenMMerchant's token

Request

{
  query {
  get_transaction_by_date(date: "04-06-2020") {
    transactions {
      _id
      approval_status
      debit_account
      credit_account
      amount
      amount_type
      refNo
      initiated_ts
      details {
        student_id
        student_name
      }

        }
  }
}
}

Success

"transactions": [
        {
          "_id": "5ed8b9990c0f1fc2769301a4",
          "approval_status": "internally_approved",
          "debit_account": "5e69deba5cef29842defb0ee",
          "credit_account": "5ebe33d8d717d70ca1a6d312",
          "amount": 30,
          "amount_type": "expense",
          "refNo": "5e69deba5cef29842defb0ee-1591261585095",
          "initiated_ts": 1591261593181,
          "details": {
            "student_id": "1004",
            "student_name": "Abhishek Dixit"
          }
        },
        {
          "_id": "5ed8b9a10c0f1f59899301a5",
          "approval_status": "internally_approved",
          "debit_account": "5e69deba5cef29842defb0ee",
          "credit_account": "5ebe33d8d717d70ca1a6d312",
          "amount": 20,
          "amount_type": "expense",
          "refNo": "5e69deba5cef29842defb0ee-1591261592982",
          "initiated_ts": 1591261601149,
          "details": {
            "student_id": "1004",
            "student_name": "Abhishek Dixit"
          }
        }
      ]

Error


Organization wallet

api for Organization Pool Balance


GRAPHQL


Headers

FieldsTypeDescriptionExampleO/MData Management
URLstring{base_url}/graphql/loop-merchant-payments-serviceM
GRAPHQLstringQUERYM
content-typestringJSONapplication/jsonM
x-access-tokenstringSession token with validitytokenMadmin token

Request

{
  query: {
    org_wallet(){
      expense
    }
  }
}

Success

{
"expense": 50000
}

Error


Assign Card Kit to Student

this api Registers student's card kit with the bank


REST


Headers

FieldsTypeDescriptionExampleO/MData Management
URLstring/v1/loop/card-kitM
METHODstringPOSTM
content-typestringJSONapplication/jsonM
x-access-tokenstringSession token with validitytokenMaccess_token of admin

Request

{
        "kitNo": "000000222222",
        "member_id": "598024db0532e4xxxxxxxxxx",
        "last_digits": "0456",
        "specialDate": "1987-07-26",
        "address": "b-4/8 rajouri garden",
        "address1": "2nd floor",
        "gender": "M",
        "country": "India",
        "city": "New Delhi",
        "state": "New Delhi",
        "pincode": "110027",
        “idType”:”PAN”,
        “idNumber”:”4212”
        “countryofIssue”:”IND”
}

Success

{
        "_id":"598024db05",
        "kitNo": "000000222222",
        "employee": "598024db0532e4xxxxxxxxxx",
        "member_id": "598024db0532e4xxxxxxxxxx",
        "specialDate": "1987-07-26",
        "address": "b-4/8 rajouri garden",
        "address1": "2nd floor",
        "gender": "M",
        "country": "India",
        "city": "New Delhi",
        "state": "New Delhi",
        "pincode": "110027",
        “idType”:”PAN”,
        “idNumber”:”4212”
        “countryofIssue”:”IND”
}

Error


Initiate Top up to Student Wallet

this api Initiate Top up to Student Wallet


GRAPHQL


Headers

FieldsTypeDescriptionExampleO/MData Management
URLstring{base_url}/loop-merchant-payments-serviceM
GRAPHQLstringMUTATIONM
content-typestringJSONapplication/jsonM
x-access-tokenstringSession token with validitytokenMCompany admin token

Request

{
  mutation {
    topup_member_wallet(
      member_id: "ABCD1234",
      amount: 100.00,
      amount_type: "expense",
      refNo: "CREDIT01"
    ){
      _id
      approval_status
      debit_account
      credit_account
      amount
      amount_type
      refNo
      success
    }
  }
}

Success

{"data":{
  "topup_member_wallet":{
  "_id": "5",
  "approval_status": "approved",
  "debit_account": "COLLEGE01",
  "credit_account": "ABCD1234",
  "amount": 100.00,
  "amount_type": "expense",
  "refNo": "CREDIT01",
  "success": true
}}}

Error


Fetch Transactions Details

this api Fetch transaction by id


REST


Headers

FieldsTypeDescriptionExampleO/MData Management
URLstring/v1/college_member_txns/txnidM
METHODstringGETM
content-typestringJSONapplication/jsonM
x-access-tokenstringSession token with validitytokenMaccess_token

Request



Success

{
        "_id_": "55323xxxxxxx",
        "amount": 45,
        "amount_type": "expense"
}

Error


Assign merchant role to member

this api assign merchant role to member


GRAPHQL


Headers

FieldsTypeDescriptionExampleO/MData Management
URLstring{base_url}/graphql/loop-merchant-payments-serviceM
GRAPHQLstringMUTATIONM
content-typestringJSONapplication/jsonM
x-access-tokenstringSession token with validitytokenMadmin token

Request

{
  mutation {
    assign_merchant_role(
      member_id: "ABCD1234"
    ){
      success
    }
  }
}

Success

{
  "success": true
}

Error


Remove merchant role to member

this api Remove merchant role from member


GRAPHQL


Headers

FieldsTypeDescriptionExampleO/MData Management
URLstring{base_url}/graphql/loop-merchant-payments-serviceM
GRAPHQLstringMUTATIONM
content-typestringJSONapplication/jsonM
x-access-tokenstringSession token with validitytokenMadmin token

Request

{
  mutation {
    remove_merchant_role(
      member_id: "ABCD1234"
    ){
      success
    }
  }
}

Success

{
  "success": true
}

Error


Fetch merchant wallet balance

this api fetch merchant wallet balance


GRAPHQL


Headers

FieldsTypeDescriptionExampleO/MData Management
URLstring{base_url}/graphql/loop-merchant-payments-serviceM
GRAPHQLstringQUERYM
content-typestringJSONapplication/jsonM
x-access-tokenstringSession token with validitytokenMMerchant's token

Request

{
  query: {
    merchant_wallet(){
      expense
    }
  }
}

Success

{
"expense": 400
}

Error


Notifications webhook

this api fetch Notifications webhook


REST


Headers

FieldsTypeDescriptionExampleO/MData Management
URLstring/webhook_urlM
METHODstringPOSTM
content-typestringJSONapplication/jsonM
x-access-tokenstringSession token with validitytokenMaccess_token

Request



Success



Error