ody class="body-bg">
Paysharp API is organized around REST. Our API has predictable resource-oriented URLs, accepts JSON request and returns response, and uses standard HTTP response codes, authentication, and verbs.
You can use our API in the sandbox(testing) and production(live) environments. We provide two different API urls and tokens for sandbox and production.
Pass API token and content-type for all the requests in header, API token can be generated from merchant dashboard.
Create a customer and assign an unique virtual bank account number for the customer. For non required fields you have to pass empty values.
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. |
Max 100 | string | N | Customer email address | |
whitelistedRemitters | Max 5 | array | N | Whitelist remitter bank account details |
Parameters | Datatype | Description |
---|---|---|
externalCustomerId | string | Returns the request value |
name | string | Returns the request value |
mobileNo | string | Returns the request value |
string | Returns the request value | |
virtualAccountNo | string | Virtual account number for the externalCustomerId |
ifscCode | string | IFSC code for the virtual account number |
beneficiaryName | string | Beneficiary name represents the client’s company or brand name |
bankName | string | Name of the bank which provides the virtual account |
whitelistedRemitters | array | Returns the request value |
{
"externalCustomerId" : "C_111457",
"name" : "ABC Corp",
"mobileNo" : "9111100000",
"email" : "",
"whitelistedRemitters" : [
{
"accountName" : "ABC Solutions",
"accountNo" : "11020001772",
"ifscCode" : "HDFC0000001"
},
{
"accountName" : "ABC Solutions",
"accountNo" : "33225527837",
"ifscCode" : "ICIC0000002"
}
]
}
{
"code" : 200,
"message" : "success",
"data" : {
"externalCustomerId" : "C_111457",
"name" : "ABC Corp",
"mobileNo" : "9111100000",
"email" : "",
"virtualAccountNo" : "799799700105",
"ifscCode" : "YESB0CMSNOC",
"beneficiaryName" : "abc corp",
"bankName" : "Yes Bank",
"whitelistedRemitters" : [
{
"accountName" : "ABC Solutions",
"accountNo" : "11020001772",
"ifscCode" : "HDFC0000001"
},
{
"accountName" : "ABC Solutions",
"accountNo" : "33225527837",
"ifscCode" : "ICIC0000002"
}
]
}
}
Update the customer information by customer Id. Only able to update name, mobileNo and email.
Parameters | Range | Datatype | Required | Description |
---|---|---|---|---|
name | Max 100 | string | N | Customer name |
mobileNo | 10 Chars | string | Y | Customer Mobile No. |
Max 100 | string | N | Customer email address | |
whitelistedRemitters | Max 5 | array | N | Whitelist remitter bank account details |
Parameters | Datatype | Description |
---|---|---|
externalCustomerId | string | Returns the request value |
name | string | Returns the request value |
mobileNo | string | Returns the request value |
string | Returns the request value | |
virtualAccountNo | string | Virtual account number for the externalCustomerId |
ifscCode | string | IFSC code for the virtual account number |
beneficiaryName | string | Beneficiary name represents the client’s company or brand name |
bankName | string | Name of the bank which provides the virtual account |
whitelistedRemitters | array | Returns the request value |
{
"name" : "ABC Corp",
"mobileNo" : "9111100000",
"email" : "abcemail@abc.com"
}
{
"code" : 200,
"message" : "success",
"data" : {
"externalCustomerId" : "C_111457",
"name" : "ABC Corp",
"mobileNo" : "9111100000",
"email" : "abcemail@abc.com",
"virtualAccountNo" : "799799700105",
"ifscCode" : "YESB0CMSNOC",
"beneficiaryName" : "abc corp",
"bankName" : "Yes Bank"
}
}
{
"name" : "ABC Corp",
"mobileNo" : "9111100000",
"email" : "abcemail@abc.com",
"whitelistedRemitters" : [
{
"accountName" : "ABC Solutions",
"accountNo" : "11020001772",
"ifscCode" : "HDFC0000001"
},
{
"accountName" : "ABC Solutions",
"accountNo" : "33225527837",
"ifscCode" : "ICIC0000002"
}
]
}
{
"code" : 200,
"message" : "success",
"data" : {
"externalCustomerId" : "C_111457",
"name" : "ABC Corp",
"mobileNo" : "9111100000",
"email" : "abcemail@abc.com",
"virtualAccountNo" : "799799700105",
"ifscCode" : "YESB0CMSNOC",
"beneficiaryName" : "abc corp",
"bankName" : "Yes Bank",
"whitelistedRemitters" : [
{
"accountName" : "ABC Solutions",
"accountNo" : "11020001772",
"ifscCode" : "HDFC0000001"
},
{
"accountName" : "ABC Solutions",
"accountNo" : "33225527837",
"ifscCode" : "ICIC0000002"
}
]
}
}
Get the customer information by customer Id.
Parameters | Datatype | Description |
---|---|---|
externalCustomerId | string | Returns the request value |
name | string | Returns the request value |
mobileNo | string | Returns the request value |
string | Returns the request value | |
virtualAccountNo | string | Virtual account number for the externalCustomerId |
ifscCode | string | IFSC code for the virtual account number |
beneficiaryName | string | Beneficiary name represents the client’s company or brand name |
bankName | string | Name of the bank which provides the virtual account |
{
"code" : 200,
"message" : "success",
"data" : {
"externalCustomerId" : "C_111457",
"name" : "ABC Corp",
"mobileNo" : "9111100000",
"email" : "abcemail@abc.com",
"virtualAccountNo" : "799799700105",
"ifscCode" : "YESB0CMSNOC",
"beneficiaryName" : "abc corp",
"bankName" : "YESBANK"
}
}
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.
Parameters | Datatype | Description |
---|---|---|
externalCustomerId | string | Returns the request value |
name | string | Returns the request value |
mobileNo | string | Returns the request value |
string | Returns the request value | |
virtualAccountNo | string | Virtual account number for the externalCustomerId |
ifscCode | string | IFSC code for the virtual account number |
beneficiaryName | string | Beneficiary name represents the client’s company or brand name |
bankName | string | Name of the bank which provides the virtual account |
{
"code" : 200,
"message" : "success",
"data" : {
"externalCustomerId" : "C_111457",
"name" : "ABC Corp",
"mobileNo" : "9111100000",
"email" : "abcemail@abc.com",
"virtualAccountNo" : "799799700105",
"ifscCode" : "YESB0CMSNOC",
"beneficiaryName" : "abc corp",
"bankName" : "YESBANK"
}
}
Reactivate the deleted customer, so the virtual account again start accepts deposits
Parameters | Range | Datatype | Required | Description |
---|---|---|---|---|
externalCustomerId | Max 36 | string | Y | Unique identifier to identify customer |
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 |
string | Returns the request value | |
virtualAccountNo | string | Virtual account number for the externalCustomerId |
ifscCode | string | IFSC code for the virtual account number |
beneficiaryName | string | Beneficiary name represents the client’s company or brand name |
bankName | string | Name of the bank which provides the virtual account |
{
"externalCustomerId" : "C_111457"
}
{
"code" : 200,
"message" : "success",
"data" : {
"externalCustomerId" : "C_111457",
"name" : "ABC Corp",
"mobileNo" : "9111100000",
"email" : "abcemail@abc.com",
"virtualAccountNo" : "799799700105",
"ifscCode" : "YESB0CMSNOC",
"beneficiaryName" : "abc corp",
"bankName" : "Yes Bank"
}
}
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. |
string | Customer email address | |
virtualAccountNo | string | Virtual account number for the externalCustomerId |
ifscCode | string | IFSC code for the virtual account number |
beneficiaryName | string | Beneficiary name represents the client’s company or brand name |
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 |
{
"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" : "abc corp",
"bankName" : "YESBANK",
"attemptCount" : 1
}
{
"code" : 200,
"message" : "success"
}
{
"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" : "abc corp",
"bankName" : "YESBANK",
"remitterName" : "ABC Solutions",
"remitterAccountNo" : "3322457837",
"remitterIfscCode" : "ICIC0000002",
"attemptCount" : 1
}
{
"code" : 200,
"message" : "success"
}
Http Status Code: 200 - Success
400 - Error
{
"code" : 400,
"errorCode" : 2002,
"message" : "externalCustomerId already exists"
}
Error Codes | Error Messages |
---|---|
2001 | Customer not found |
2002 | externalCustomerId already exists |
2003 | Virtual account No. already exists |
Login to your Sandbox / Production environment and Virtual Account API Postman Collection download from the dashboard.