Sample Request and Response for Smart Send APIs

Create Smart Send Link API

Sample request

curl --location --request POST 'https://oneapi.payu.in/payout/v2/smartSend/link' \
--header 'authorization: Bearer f596252f5ccfeb775071b1202a80328d40bf58cf0c468f150220d16dce9deeee' \
--header 'pid: 1111312' \
--header 'Content-Type: application/json' \
--data-raw '{
    "amount": "1",
    "merchantRefId": "TEST00020",
    "custName": "DIVIK",
    "custMobile": "9868888568",
    "description": "TEST",
    "expiryDate": "2021-07-23T10:00:49.778Z"
}'

Sample response

Success scenario

{
	"status": 0,
	"msg": "Success",
	"code": null,
	"data": {
		"link": "https://test.payumoney.com/url/1IOrXuzqo5KH",
		"linkId": "D9tCcL3ICHYsby5Op1BXv9vETLDvfiExyXAC9jf/lQ2xTIIUAyREa2ZN3VbrMmFx",
		"expiryDate": "2021-07-21T12:19:04.882+0000"
	}
}

Failure scenario

  • Access Denied
{
  "timestamp": "2024-01-30T09:03:39.698+0000",
  "status": 401,
  "error": "Unauthorized",
  "message": "Access is denied",
  "path": "/payout/v2/smartSend/link"
}

Smart Send Details API

Sample request

curl --location 'https://payout.payumoney.com/payout/merchant/smartSend/details?payoutMerchantId=2212618&merchantRefId=abcde’ \
--header 'accept: application/json, text/plain, */*' \
--header 'content-type: application/json' \
--header 'authorization: Bearer 89fec7522b42cfe5387672a4eb9c8f568bf1da59304c3ee54bcf77db7ef23e22'

Response parameter description

KeyDescriptionData TypePossible Values
merchantRefIdUnique reference Id used while creating smart sendString"abcde"
payoutMerchantIdSpecify the payout merchant id provided while onboarding or creating Payout account.Long2212618
smartSendStatusCurrent status of Smart send, status list can be found at the end of pageString“EXPIRED”
addedOnCreation time of Smart sendTimestamp in UTC“2023-11-06T20:16:39.000+0000”
expiryDateExpiry Time of Smart SendTimestamp in UTC“2023-11-09T00:00:00.000+0000”
descriptionPurpose of smart sendString“Test”
amountAmount of Smart sendDouble10.0
updatedOnLast updated timestamp of smart sendTimestamp in UTC"2023-11-09T00:00:03.000+0000"
transferTypeSmart Send Payout mode basis beneficiary's choice of receiving funds into Account or VPAString“UPI” , “IMPS” etc.
bankTransactionRefNoContains the bank transfer reference numberString“U8712301293”
payuTransactionRefNoContains the PayU transaction reference number.String“PAYOUT1702966295695uQNG9eyN84z”
txnStatusContains the transaction status for this transaction. For list of transaction status, refer to Transaction Status sub-sectionString“SUCCESS”
txnSubStatusContains the sub-status of the transactionString
lastStatusUpdateDateLast updated on transactionTimestamp in UTC“2023-11-09T00:00:00.000+0000”
custNameIndicates the Beneficiary name to which the link is to be sentString“ABC”
custEmailIndicates the email address of the beneficiaryString[email protected]
custMobileIndicates the mobile number of the beneficiaryString9999999999
msgContains the response message for transactionString
linkContains the Smart pay linkString
succeedOnTimestamp when Transaction got succeededTimestamp in UTC“2023-11-09T00:00:01.000+0000”
txnSourceContains source of transcationString“API”

Sample response

Success Scenario
{
    "status": 0,
    "msg": null,
    "code": null,
    "data": {
        "merchantRefId": "abcde",
        "payoutMerchantId": 2212618,
        "smartSendStatus": "SUCCESS",
        "addedOn": "2023-12-19T06:10:37.000+0000",
        "expiryDate": "2023-12-25T06:10:45.000+0000",
        "description": "Cashback",
        "linkId": "61362222-a29a-4191-8157-88a87a9d30d1",
        "amount": 25.0,
        "bankTransactionRefNo": "PAYOUT1702966295695uQNG9eyN84z",
        "payuTransactionRefNo": "PAYOUT1702966295695uQNG9eyN84z",
        "txnStatus": "SUCCESS",
        "txnSubStatus": null,
        "lastStatusUpdateDate": "2023-12-19T07:55:02.000+0000",
        "transferType": "IMPS",
        "custName": "sara",
        "custEmail": null,
        "custMobile": "9888883254",
        "msg": "Success",
        "link": "https://test.payumoney.com/url/OIuMXJR5ZL6d",
        "succeedOn": "2023-12-19T07:55:02.000+0000",
        "txnSource": "SMART_SEND"
    }
}

Failure sceanario

  • No record found:The Smart Send Details cannot be fetched and to considered as unidentified or Pending by merchant.
{
    "status": 1,
    "msg": "Smart Send Record not found with merchant reference id - xyz. for Payout Merchant Id - 2212618. Kindly fetch details after some time.",
    "code": null,
    "data": {
        "merchantRefId": "12",
        "payoutMerchantId": 1117371,
        "smartSendStatus": null,
        "addedOn": null,
        "expiryDate": null,
        "description": null,
        "linkId": null,
        "amount": null,
        "bankTransactionRefNo": null,
        "payuTransactionRefNo": null,
        "txnStatus": null,
        "txnSubStatus": null,
        "lastStatusUpdateDate": null,
        "transferType": null,
        "custName": null,
        "custEmail": null,
        "custMobile": null,
        "msg": null,
        "link": null,
        "succeedOn": null,
        "txnSource": null
    }
}

Smart Send Status API

Sample request

curl --location --request GET 'https://payumoney.com/payout/v2/smartSend/status?linkId=anJFU9vrS0pqXXLOva96oBx5NkYhRLwiSahksBJbQXrTwluheEAa4oTOKsLMCoNg'

Sample response

{
    "status": 0,
    "msg": "SmartPay Link cancelled",
    "code": 1122,
    "data": null
}

Extend Expiry Date API

Sample request

curl --location --request PUT 'https://oneapi.payu.in/payout/v2/smartSend/expiry/123' \
--header 'mid: 8000051' \
--header 'authorization: Bearer b6c0782b9eb08b43681776bad60ca1894a8421539e7c96c9aa32c0805994046d' \
--header 'pid: 1111312' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'expiryDate=2021-07-24T18:18:10.000Z'

Sample response

Success scenario

Failure scenario

{
  "timestamp": "2024-01-30T09:07:37.189+0000",
  "status": 401,
  "error": "Unauthorized",
  "message": "Access is denied",
  "path": "/payout/v2/smartSend/expiry/123"
}

Cancel Smart Send API

Sample request

curl --location --request POST 'https://test.payumoney.com/payout/smartPay/cancel?merchantRefId=Test6Sep3' \--header 'Authorization: Bearer 0eabb5d79b6324ceae72c96c6099932b219d58d293642d6b9503f5ace7e416ed' \--header 'payoutMerchantId: 1111766' \--header 'Content-Type: application/json'

Sample response

Failure scenario

{
	"status": 0,
	"msg": "Smart send link cancelled",
	"code": null,
	"data": null
}