3. Core APIs

3.3. Re−generate Short URL POST

When a new mandate registration request is created a URL is sent to the mobile number of the customer. On clicking the link the customer is directed to a review page where all the details of the mandate are presented. This link has a validity period, after the validity period is over, any click on this link take the customer to the error page.

This API is used to extend the validity of the link sent to the customer. This API can also use if the link was not created in the normal flow for whatever reason. The API will return an error if the mandate request for the reference number passed has already been authorised or rejected.

The details of the API are given below:

3.1.1. Request

Request URL / Method

Attribute Value
URL https:///corporate/mr/{referenceNumber}/generate-url
Method POST

Request Body

Name Mandatory Max. Length Type Description
utilityCode M 18 AN NPCI Identifier for the merchant. (see Prerequisites)
validity O 10 Integer Time in minutes which extends the validity of shortUrl. Default is 4320 (3 days) or what is configured for the corporate.
3.3.2. Response

The API returns the standard response. The following tables enumerate the possible “code” values for an API failure and describe the JSON object in the “message” in case of the API success.

Response Message Object Details

Name Type Description
utilityCode string Utility code passed in the request.
referenceNumber string Reference number passed in the request.
status string Status of url generation.
shortUrl string URL that was generated.
validTill date-time Validity period of the shortUrl.
nbOfUrl int Number of times url generated.
CURL REQUEST
curl --location 'https://sandboxapi.paycorp.io/v0.0.0/corporate/mr/28780431285322f252/generate-url' \
    --header 'Content-Type: application/json' \
    --header 'x-api-key: Paycorp will provide api key at the time of onboarding ' \
    --header 'Cookie: JSESSIONID=1C00123E1B68B426DD296C92A9A2C755' \
    --data '{
        "utilityCode" : "NACH00000000000019",
        "validity" : "10"
    }'
RESPONSE

Click Try It! to start a request and see the response here! Or choose an example:

application/json