Virtual Account API Reference ( v1.0)

Introduction

Paysharp APIs are built using REST architecture, featuring predictable, resource-oriented URLs. Our APIs accept JSON-formatted requests, return JSON responses, and utilize standard HTTP verbs, response codes, and authentication methods.

You can integrate Paysharp APIs in both sandbox (testing) and production (live) environments. Separate base URLs and API tokens are provided for each environment.

For every API request, include the following headers:

  • content-type: application/json
  • authorization: Bearer <token>

API tokens can be generated from your merchant dashboard.

Create Virtual Account API

Create a customer and assign an unique virtual bank account number for the customer. For non required fields you have to pass empty values.

  • URL: /customers
  • Method: POST

Request

Parameters Range Datatype Required Description
externalCustomerId Max 36 string Y Unique identifier to identify customer
name Max 100 string N Customer name
mobileNo 10 Chars string Y Customer Mobile No.
email Max 100 string N Customer email address
whitelistedRemitters Max 5 array N Whitelist remitter bank account details

Response

Parameters Datatype Description
externalCustomerId string Returns the request value
name string Returns the request value
mobileNo string Returns the request value
email string Returns the request value
virtualAccountNo string Virtual account number for the externalCustomerId
ifscCode string IFSC code for the virtual account number
beneficiaryName string The beneficiary name will always be returned as Paysharp Private Limited. Payments made to this virtual account are collected by Paysharp Private Limited, an RBI-licensed Payment Aggregator, on behalf of the merchant
bankName string Name of the bank which provides the virtual account
whitelistedRemitters array Returns the request value

Example

Request

{

   "externalCustomerId" :   "C_111457",

   "name" :   "ABC Corp",

   "mobileNo" :   "9111100000",

   "email" :   "",

   "whitelistedRemitters" : [  

    {

      "accountName" :   "ABC Solutions",

      "accountNo" :   "11020001772",

      "ifscCode" :   "HDFC0000001"

    },

    {

      "accountName" :   "ABC Solutions",

      "accountNo" :   "33225527837",

      "ifscCode" :   "ICIC0000002"

    }

   ]

}

Response

{

   "code" :   200,

   "message" :   "success",

   "data" : {  

"externalCustomerId" :   "C_111457",

"name" :   "ABC Corp",

"mobileNo" :   "9111100000",

"email" :   "",

"virtualAccountNo" :   "799799700105",

"ifscCode" :   "YESB0CMSNOC",

"beneficiaryName" :   "Paysharp Private Limited",

"bankName" :   "Yes Bank",

 "whitelistedRemitters" : [  

     {

        "accountName" :   "ABC Solutions",

        "accountNo" :   "11020001772",

        "ifscCode" :   "HDFC0000001"

    },

     {

        "accountName" :   "ABC Solutions",

        "accountNo" :   "33225527837",

        "ifscCode" :   "ICIC0000002"

    }

    ]

   }

}

Update Virtual Account API

Update the customer information by customer Id. Only able to update name, mobileNo and email.

  • URL: /customers/{externalCustomerId}
  • Method: PUT

Request

Parameters Range Datatype Required Description
name Max 100 string N Customer name
mobileNo 10 Chars string Y Customer Mobile No.
email Max 100 string N Customer email address
whitelistedRemitters Max 5 array N Whitelist remitter bank account details

Response

Parameters Datatype Description
externalCustomerId string Returns the request value
name string Returns the request value
mobileNo string Returns the request value
email string Returns the request value
virtualAccountNo string Virtual account number for the externalCustomerId
ifscCode string IFSC code for the virtual account number
beneficiaryName string The beneficiary name will always be returned as Paysharp Private Limited. Payments made to this virtual account are collected by Paysharp Private Limited, an RBI-licensed Payment Aggregator, on behalf of the merchant
bankName string Name of the bank which provides the virtual account
whitelistedRemitters array Returns the request value

Example 1

Request

{

   "name" :   "ABC Corp",

   "mobileNo" :   "9111100000",

   "email" :   "abcemail@abc.com"

}

Response

{

   "code" :   200,

   "message" :   "success",

   "data" : {  

"externalCustomerId" :   "C_111457",

"name" :   "ABC Corp",

"mobileNo" :   "9111100000",

"email" :   "abcemail@abc.com",

"virtualAccountNo" :   "799799700105",

"ifscCode" :   "YESB0CMSNOC",

"beneficiaryName" :   "Paysharp Private Limited",

"bankName" :   "Yes Bank"

}

}

Example 2

Request

{

   "name" :   "ABC Corp",

   "mobileNo" :   "9111100000",

   "email" :   "abcemail@abc.com",

   "whitelistedRemitters" : [  

     {

      "accountName" :   "ABC Solutions",

      "accountNo" :   "11020001772",

      "ifscCode" :   "HDFC0000001"

    },

     {

      "accountName" :   "ABC Solutions",

      "accountNo" :   "33225527837",

      "ifscCode" :   "ICIC0000002"

    }

   ]

}

Response

{

   "code" :   200,

   "message" :   "success",

   "data" : {  

"externalCustomerId" :   "C_111457",

"name" :   "ABC Corp",

"mobileNo" :   "9111100000",

"email" :   "abcemail@abc.com",

"virtualAccountNo" :   "799799700105",

"ifscCode" :   "YESB0CMSNOC",

"beneficiaryName" :   "Paysharp Private Limited",

"bankName" :   "Yes Bank",

      "whitelistedRemitters" : [  

     {

      "accountName" :   "ABC Solutions",

      "accountNo" :   "11020001772",

      "ifscCode" :   "HDFC0000001"

    },

     {

      "accountName" :   "ABC Solutions",

      "accountNo" :   "33225527837",

      "ifscCode" :   "ICIC0000002"

    }

   ]

   }

}

Get Virtual Account API

Get the customer information by customer Id.

  • URL: /customers/{externalCustomerId}
  • Method: GET

Request

N/A

Response

Parameters Datatype Description
externalCustomerId string Returns the request value
name string Returns the request value
mobileNo string Returns the request value
email string Returns the request value
virtualAccountNo string Virtual account number for the externalCustomerId
ifscCode string IFSC code for the virtual account number
beneficiaryName string The beneficiary name will always be returned as Paysharp Private Limited. Payments made to this virtual account are collected by Paysharp Private Limited, an RBI-licensed Payment Aggregator, on behalf of the merchant
bankName string Name of the bank which provides the virtual account

Example

Response

{

   "code" :   200,

   "message" :   "success",

   "data" : {  

   "externalCustomerId" :   "C_111457",

   "name" :   "ABC Corp",

   "mobileNo" :   "9111100000",

   "email" :   "abcemail@abc.com",

   "virtualAccountNo" :   "799799700105",

   "ifscCode" :   "YESB0CMSNOC",

   "beneficiaryName" :   "Paysharp Private Limited",

   "bankName" :   "YESBANK"

}

}

Deactivate Virtual Account API

Deactivate a customer by customer Id, the virtual account associated with the customer also will be deleted and any future payments to the virtual account will be rejected.

  • URL: /customers/{externalCustomerId}
  • Method: DELETE

Request

N/A

Response

Parameters Datatype Description
externalCustomerId string Returns the request value
name string Returns the request value
mobileNo string Returns the request value
email string Returns the request value
virtualAccountNo string Virtual account number for the externalCustomerId
ifscCode string IFSC code for the virtual account number
beneficiaryName string The beneficiary name will always be returned as Paysharp Private Limited. Payments made to this virtual account are collected by Paysharp Private Limited, an RBI-licensed Payment Aggregator, on behalf of the merchant
bankName string Name of the bank which provides the virtual account

Example

Response

{

   "code" :   200,

   "message" :   "success",

   "data" : {  

   "externalCustomerId" :   "C_111457",

   "name" :   "ABC Corp",

   "mobileNo" :   "9111100000",

   "email" :   "abcemail@abc.com",

   "virtualAccountNo" :   "799799700105",

   "ifscCode" :   "YESB0CMSNOC",

   "beneficiaryName" :   "Paysharp Private Limited",

   "bankName" :   "YESBANK"

   }

}

Reactivate Virtual Account API

Reactivate the deleted customer, so the virtual account again start accepts deposits

  • URL: /customers/reactivate
  • Method: POST

Request

Parameters Range Datatype Required Description
externalCustomerId Max 36 string Y Unique identifier to identify customer

Response

Parameters Datatype Description
externalCustomerId string Returns true if VPA is valid or not
name string Returns the request value
mobileNo string Returns the request value
email string Returns the request value
virtualAccountNo string Virtual account number for the externalCustomerId
ifscCode string IFSC code for the virtual account number
beneficiaryName string The beneficiary name will always be returned as Paysharp Private Limited. Payments made to this virtual account are collected by Paysharp Private Limited, an RBI-licensed Payment Aggregator, on behalf of the merchant
bankName string Name of the bank which provides the virtual account

Example

Request

{

   "externalCustomerId" :   "C_111457"

}

Response

{

   "code" :   200,

   "message" :   "success",

   "data" : {  

"externalCustomerId" :   "C_111457",

"name" :   "ABC Corp",

"mobileNo" :   "9111100000",

"email" :   "abcemail@abc.com",

"virtualAccountNo" :   "799799700105",

"ifscCode" :   "YESB0CMSNOC",

"beneficiaryName" :   "Paysharp Private Limited",

"bankName" :   "Yes Bank"

}

}

Get Transaction Information

Get the transaction information by paysharp reference number.

  • URL: /transactions/{paysharp reference number}
  • Method: GET

Request

N/A

Response

Parameters Datatype Description
externalCustomerId string Returns the customer Id for the transaction
amount number Amount for the transaction
fee number Fee for the transaction
tax number Tax for the transaction fee
totalFee number Sum of fee and tax
netAmount number Actual amount after deducting fee and tax.
paysharpReferenceNo string Payment reference number for the payment
utrNumber string Unique transaction reference number returned by bank for the fund transfer
transactionDate datetime Transaction date
name string Customer name
mobileNo string Customer Mobile No.
email string Customer email address
virtualAccountNo string Virtual account number for the externalCustomerId
ifscCode string IFSC code for the virtual account number
beneficiaryName string The beneficiary name will always be returned as Paysharp Private Limited. Payments made to this virtual account are collected by Paysharp Private Limited, an RBI-licensed Payment Aggregator, on behalf of the merchant
bankName string Name of the bank which provides the virtual account
remitterName string Remitter name provided by bank who done the transaction (The field only applicable for remitters whitelisted transaction)
remitterAccountNo string Remitter account number (The field only applicable for remitters whitelisted transaction)
remitterIfscCode string Remitter account IFSC Code (The field only applicable for remitters whitelisted transaction)

Example 1

Response

{

   "code" :   200,

   "message" :   "success",

   "data" : {  

"externalCustomerId" :   "C_111457",

"amount" :   150000.00,

"fee" :   10.00,

"tax" :   1.80,

"totalFee" :   11.80,

"netAmount" :   149988.20,

"paysharpReferenceNo" :   "PS20200105167004",

"utrNumber" :   "N2020015167004",

"transactionDate" :   "2020-04-27T22:23:20Z",

"name" :   "ABC Corp",

"mobileNo" :   "9111100000",

"email" :   "abcemail@abc.com",

"virtualAccountNo" :   "799799700105",

"ifscCode" :   "YESB0CMSNOC",

"beneficiaryName" :   "Paysharp Private Limited",

"bankName" :   "YESBANK"

}

}

Example 2 (For remitter whitelisted account)

Response

{

   "code" :   200,

   "message" :   "success",

   "data" : {  

"externalCustomerId" :   "C_111457",

"amount" :   150000.00,

"fee" :   10.00,

"tax" :   1.80,

"totalFee" :   11.80,

"netAmount" :   149988.20,

"paysharpReferenceNo" :   "PS20200105167004",

"utrNumber" :   "N2020015167004",

"transactionDate" :   "2020-04-27T22:23:20Z",

"name" :   "ABC Corp",

"mobileNo" :   "9111100000",

"email" :   "abcemail@abc.com",

"virtualAccountNo" :   "799799700105",

"ifscCode" :   "YESB0CMSNOC",

"beneficiaryName" :   "Paysharp Private Limited",

"bankName" :   "YESBANK",

"remitterName" :   "ABC Solutions",

"remitterAccountNo" :   "3322457837",

"remitterIfscCode" :   "ICIC0000002"

}

}

Virtual Account Webhook

Our system will call your webhook url and post the payment status when payment is received. In case your webhook does not respond, our system will call your url for maximum four times in a 15 minutes interval if all four attempts failed, you will receive email notification about the issue

Parameters Datatype Description
externalCustomerId string Returns the customer Id for the order
amount number Amount received for the transaction (Paysharp does not set any maximum amount limits)
fee number Fee for the transaction
tax number Tax for the transaction fee
totalFee number Sum of fee and tax
netAmount number Actual amount after deducting fee and tax.
paysharpReferenceNo string Payment reference number for the payment
utrNumber string Unique transaction reference number returned by bank for the fund transfer
transactionDate datetime Transaction date in ISO 8601 format
name string Customer name
mobileNo string Customer Mobile No.
email string Customer email address
virtualAccountNo string Virtual account number for the externalCustomerId
ifscCode string IFSC code for the virtual account number
beneficiaryName string The beneficiary name will always be returned as Paysharp Private Limited. Payments made to this virtual account are collected by Paysharp Private Limited, an RBI-licensed Payment Aggregator, on behalf of the merchant
bankName string Name of the bank which provides the virtual account
remitterAccountNo string Remitter account number (The field only applicable for remitters whitelisted transaction)
remitterName string Remitter name provided by bank who done the transaction (The field only applicable for remitters whitelisted transaction)
remitterIfscCode string Remitter account IFSC Code (The field only applicable for remitters whitelisted transaction)
attemptCount number Number of times the webhook invoked

Example 1

Request

    {  

"externalCustomerId" :   "C_111457",

"amount" :   150000.00,

"fee" :   10.00,

"tax" :   1.80,

"totalFee" :   11.80,

"netAmount" :   149988.20,

"paysharpReferenceNo" :   "PS20200105167004",

"utrNumber" :   "N2020015167004",

"transactionDate" :   "2020-04-27T22:25:51+05:30",

"name" :   "ABC Corp",

"mobileNo" :   "9111100000",

"email" :   "abcemail@abc.com",

"virtualAccountNo" :   "799799700105",

"ifscCode" :   "YESB0CMSNOC",

"beneficiaryName" :   "Paysharp Private Limited",

"bankName" :   "YESBANK",

"attemptCount" :   1

   }

Response

    {  

"code" :   200,

"message" :   "success"

   }

Example 2 (For remitter whitelisted account)

Request

    {  

"externalCustomerId" :   "C_111457",

"amount" :   150000.00,

"fee" :   10.00,

"tax" :   1.80,

"totalFee" :   11.80,

"netAmount" :   149988.20,

"paysharpReferenceNo" :   "PS20200105167004",

"utrNumber" :   "N2020015167004",

"transactionDate" :   "2020-04-27T22:25:51+05:30",

"name" :   "ABC Corp",

"mobileNo" :   "9111100000",

"email" :   "abcemail@abc.com",

"virtualAccountNo" :   "799799700105",

"ifscCode" :   "YESB0CMSNOC",

"beneficiaryName" :   "Paysharp Private Limited",

"bankName" :   "YESBANK",

"remitterName" :   "ABC Solutions",

"remitterAccountNo" :   "3322457837",

"remitterIfscCode" :   "ICIC0000002",

"attemptCount" :   1

   }

Response

    {  

"code" :   200,

"message" :   "success"

   }

API Success and Error Messages

Http Status Code: 200 - Success

400 - Error

Sample Error Response

     {

      "code" :   400,

      "errorCode" :   2002,

      "message" :   "externalCustomerId already exists"

    }

Possible Errors

Error Codes Error Messages
2001 Customer not found
2002 externalCustomerId already exists
2003 Virtual account No. already exists
2201 Transaction not found

Postman Collection

Login to your Sandbox / Production environment and download from the Settings -> Configuration page.