Skip to main content

10. Request to Pay (Event Based and E-Mandate Based)

Request to pay is a pull type payment instrument, such that NPI will be enabled for such Request to Pay (R2P) instruction as request and process between the members. Such R2P instruction can be Event based or E-mandate based. The ultimate Payee and Payer could be a member or its customer, with request being originated from any of the channels. The members (direct or indirect/ technical) will be Payee Agent and Payer Agent for their customers as Payee and Payer. An event based R2P can be initiated for one-time event corresponding to which a debit request will be initiated and based on Payers confirmation, a credit transfer from Payer to Payee will be initiated. E-Mandate based R2P can be initiated based on pre-authorized debit request by Payer as one-time setup, corresponding to which successive transfer from Payer to Payee will be initiated on scheduled time or as and when required.

10.1. Event Based R2P

Example Image

Figure: Process flow diagram of R2P Event based

In order to facilitate “Request To Pay” a core-engine is developed. The access to this engine for different channels such as connectIPS, mobile banking, PSPs and other third-party channels will be extended through NPI. Further processing of debit transfer request will be done in core engine of request to pay.

Process Flow

  1. Payee initiates a “request to pay” request.

  2. Payee agent sends the request to NPI.

  3. NPI will perform technical and business validation of the request, checks security and sessions.

  4. NPI will transmit the request to the R2P core engine.

  5. R2P core engine will lodge the request.

  6. It identifies the payer agent and transmits the request.

  7. Payer agent will provide “Request to Pay” notification to its user.

  8. Once the user accepts or rejects the request, Payer Agent passes the message to NPI.

  9. NPI will pass the message to R2P engine.

  10. Request to pay engine will validate the message and confirm to NPI.

  11. NPI will initiate the transaction and sends the notification to the R2P core engine.

  12. R2P core engine will send final notification to both payer and payee engine

Members could be either payer agent or payee agent in the payment chain and exchange financial or non-financial message as below.

10.1.1. Fetch Participant List

Post Method:/r2p/v1/participants

Request Parameters

#Data ItemsTypeLengthDescriptionPresence
1participantCodeString20Code provided to participant system/Participant ID.Y
2tokenStringHash value/Signature of NPI user ID of the member. (SHA256withRSA)Y

Sample request:

{ 
"participantCode": "MORU@999",
"token":"HfnNp7dkeyb4GRwHRR0J0qReTiTzpoGKhE6AWaAZap0lrL9qfavtBithYOKcF4JRob9HrFyYZioRA08jHkgDMqEBNUIWKN/nG+HdhIBIHbJxU7qJulVPtIxDQeJF0weSrfT2SjskscTzhbUPKug+gZHHbhpXVOTdzBhZVPXSpEA="
}

Response Parameters

#Data ItemsTypeLengthDescriptionPresence
1participantCodeString20Code provided to participant system/Participant ID.Y
2participantNameString200Full name of participant systemY
3allowedIdentificationCodeENUM1Identifier accepted by the system for R2P processing. M-Mobile number, A-Account Details, U-User idY

Sample Response:

 {
"responseCode":"000",
"responseData":{
"timeStamp":"2022-10-20 09:54:20",
"statusCode":"200",
"status":"Success",
"message":"Successfully retrieved participants.",
"responseData":[
{
"participantCode":"MORU@999",
"participantName":"Moru wallet",
"allowedIdentificationCode":"M"
},
{
"participantCode":"KHALTI@999",
"participantName":"Khalti private limited.",
"allowedIdentificationCode":"U"
},
{
"participantCode":"APPLE1",
"participantName":"Apple Cop",
"allowedIdentificationCode":"U"
}
]
},
"responseStatus":"SUCCESS"
}

10.1.2. Request from Payee Agent to NPI (Non-Financial Messages)

Post method: /r2p/v1/request

Request Parameters

#Data ItemsTypeFormatLengthDescriptionPresence
1originatorUniqueIdString-20Transaction Id generated by Payee agent.M
2originatorParticipantCodeString-20Payee Agent code.M
3receiverParticipantCodeString-20Payer Agent code.M
4payeeIdentifierCodeENUMM or U or A1Payee identifier code. M(Mobile number), U(User id), A(Account number).M
5payeeMobileNumberString+977-98xxxxxxx15Mandatory if payeeIdentifierCode is M.C
6payeeUserIdString-200Mandatory if payeeIdentifierCode is U.C
7creditBankAccountString-20Mandatory if payeeIdentifierCode is A.C
8creditBankCodeString-4Mandatory if payeeIdentifierCode is A.C
9creditBranchCodeString-4Mandatory if payeeIdentifierCode is A.C
10payerIdentifierCodeENUMM or U or A1Payer identifier code. M(Mobile number), U(User id), A(Account number).M
11payerUserIdString-200Mandatory if payerIdentifierCode is U.C
12payerMobileNumberString+977-98xxxxxxx15Mandatory if payerIdentifierCode is M.C
13debitBankAccountString-20Mandatory if payerIdentifierCode is A.C
14debitBankCodeString-4Mandatory if payerIdentifierCode is A.C
15debitBranchCodeString-4Mandatory if payerIdentifierCode is A.C
16creditorNameString-200Name of creditor.M
17amountBigDecimalxx.xx-Amount requested.M
18canAmountVaryENUMY or N1Y indicates actual transaction amount can vary.M
19purposeString-50Purpose for request to pay.O
20TokenString--Token for integrity of data.M

Sample Request

{
"originatorUniqueId":"moru-r2p2",
"originatorParticipantCode":"MORU@999",
"receiverParticipantCode":"CONNECTIPS",
"payeeIdentifierCode":"M",
"payeeMobileNumber":"+977-9841846222",
"payerIdentifierCode":"A",
"debitBankAccount":"04810017506210",
"debitBankCode":"0401",
"debitBranchCode":"48",
"creditorName":"Moru wallet user",
"amount":100,
"canAmountVary":"N",
"purpose":"General transfer",
"token":"iVUwbvMjOyjETiQyLxTnyH83vlvy4CC1ZqYRsbcIw/R3apEORmtbbzzaqMAy+6N98fuYLxlCJryzdc1vS6dBs1bs8b4ENUVAVy54J6+hxA229ArzVRzxXgrflOIC1XETQ8ol5FjBsdLYkPymeY64riLP/ eKPlxgp0AZJUwKFyEg="
}
Token String ="originatorUniqueId+","+originatorParticipantCode+","+receiverParticipantCode+","+payeeIdentifierCode+","+payerIdentifierCode+","+creditorName+","+amount+","+canAmountVary+","+npiuserId"

Response from NPI to Payee Agent

Response Parameters

#Data ItemsData TypeFormatLengthDescriptionPresence
1TimestampStringM
2statusCodeString
3StatusString
4MessageString
5requestToPayIdString30Unique Id generated by Request to pay moduleM
6originatorUniqueIdString20Transaction Id generated by Payee agentM
7receiverParticipantCodeStringM
8requestExpiryDateStringM
9AmountBigDecimalM
10StatusStringM

Sample Response

{
"responseCode":"000",
"responseDescription":"SUCCESS",
"data":{
"responseCode":"200",
"responseStatus":"Success",
"responseMessage":"Transaction successfully received.",
"requestToPayId":"IME2210230000827JX9Z",
"originatorUniqueId":"15",
"originatorParticipantCode":"IMEPAY@999",
"receiverParticipantCode":"KHALTI@999",
"payeeIdentifierCode":"M",
"payeeMobileNumber":"+977-9861591786",
"payeeUserId":null,
"creditBankAccount":null,
"creditBankCode":null,
"creditBranchCode":null,
"payerIdentifierCode":"A",
"payerUserId":null,
"payerMobileNumber":null,
"debitBankAccount":"0787894032524001",
"debitBankCode":"2301",
"debitBranchCode":"07",
"senderName":null,
"creditorName":"Rakesh Shrestha",
"amount":23.45,
"canAmountVary":"N",
"amountVaryFlag":null,
"purpose":"Need my payment regarding computer purchase",
"requestExpiryDate":"2022-10-24 04:17:29",
"actingTime":null,
"status":"RECEIVED",
"payBatchId":null,
"payTxnId":null,
"debitStatus":null,
"creditStatus":null,
"token":"FqGgk8IoxyDzZ+xfTOOJp3URmjxhzS9HyIYvCzcPTltegGO4u0+JtdPLQkALv+2/W52jwHVmpEmuWEb3HMWhUJSCiEUm0Q0oRt25bYjPbXE7Qo4ZaynwnqLV5NsFtrIRJ1P28vmp8Ly3n4UEFTwrJBEZMjbglaZWNBB9G2n55U=",
"cipsVPA":null,
"acceptRejectedFlag":null
}
}

Sample failure response

{
"responseCode":"001",
"responseDescription":"Requested Payer Not Found",
"data":null,
"npiBatchId":null,
"npiTransactionId":null,
"debitStatus":null,
"creditStatus":null,
"debitDescription":null,
"creditDescription":null,
"rcreTime":null
}

10.1.3. Request from NPI to Payer Agent

Payer agent should support the following message format at their side to receive incoming request to pay messages. URL and API credentials should be provided to be registered in Request To Pay core module. The API should be REST based and preferably implemented over OAuth2.0.

Request Parameters

#Parameter NameData TypeFormatLengthDescriptionPresence
1requestToPayIdString30Unique id to identify the request to pay message in processingM
2originatorUniqueIDString20Transaction Id generated by Payee agentM
3originatorParticipantCodeString20Unique ID of originating channel provider/payee agent (CIPS, Wallets, Mobile App etc). Request to Pay originating participant codeM
4receiverParticipantCodeString20Unique ID of the receiving channel provider/payer agent (CIPS, Wallets, Mobile App etc). Request to Pay receiver participant codesM
5AmountBigDecimalxx.xxTransaction AmountM
6canAmountVaryENUM1Indicate actual transaction amount can vary (Less than requested amount).M
7purposeString50Remarks-purpose for R2PO
8payeeIdentifierCodeENUM1Payee Identifier (M-Mobile Number, U-User Id, A-Account Details)M
9payeeMobileNumberString+977-98xxxxxx or +977-98XXXXXXXXRequired if payee identifier is MC
10payeeUserIdString200Required if payee identifier is UC
11payerIdentifierCodeENUM1Mobile No/User Id of the payer (M-Mobile Number, U-User Id, A-Account Details)M
12payerMobileNumberString+977-98xxxxxxxx15+977-98xxxxxxxx(Required if payer identifier is M)C
13payerUserIdString200(Required if payer identifier is U)C
14debitBankAccountString20(Required if payer identifier is A)C
15debitBankCodeString4(Required if payer identifier is A)C
16debitBranchCodeString(Required if payer identifier is A)C
17creditBankCodeString20C redit A/C NumberO
18creditorNameString200Name of the creditor who initiated the frequest to pay M
19creditBankCodeString4Crediting Bank CodeO
20creditBranchCodeString4crediting BranchO
21requestExpiryYYYYMMDDHHmmssSSSExample:2021-0003-15 11:38:43M
22tokenToken generated for processing of the messageM

Sample Request

{
"requestToPayId": " KHA20210314172343903D14AbMFiXa",
"originatorUniqueId": "20787899710",
"originatorParticipantCode": "KHALTI",
"receiverParticipantCode": "NICA",
"amount": 10.00,
"canAmountVary": "N",
"purpose": "General Transfer",
"payeeIdentifierCode": "M",
"payeeMobileNumber": "+977-9866622789",
"payerIdentifierCode": "A",
"debitBankAccount": "012454545544454545",
"debitBankCode": "2301",
"debitBranchCode": "01",
"creditorName": "Nishant Parajuli",
"requestExpiry": "2021-03-15 11:38:43",
"token": "<Signature Token>"
}
{
"Token String": {
"REQUESTTOPAYID": "requestToPayId",
"ORIGINATORUNIQUEId": "OriginatorUniqueId",
"ORIGINATORPARTICIPANTCODE": "originatorParticipantCode",
"RECEIVERPARTICIPANTCODE": "receiverParticipantCode",
"PAYEEIDENTIFIERCODE": "payeeIdentifierCode",
"PAYEEMOBILENUMBER": "payeeMobileNumber",
"PAYEEUSERID": "payeeUserId",
"CREDITBANKACCOUNT": "creditBankAccount",
"CREDITBANKCODE": "creditBankCode",
"CREDITBRANCHCODE": "creditBranchCode",
"PAYERIDENTIFIERCODE": "payerIdentifierCode",
"PAYERMOBILENUMBER": "payerMobileNumber",
"PAYERUSERID": "payerUserId",
"DEBITBANKACCOUNT": "debitBankAccount",
"DEBITBANKCODE": "debitBankCode",
"DEBITBRANCHCODE": "debitBranchCode",
"CREDITORNAME": "creditorName",
"AMOUNT": "amount",
"CANAMOUNTVARYFlAG": "canAmountVaryFlag",
"REQUESTEXPIRYDATE": "requestExpiryDate",
"PURPOSE": "purpose"
}
}

10.1.4. Response from Payer Agent to NPI

Payer agent should provide the following response on receiving the request message as in point 3.

Response Parameters

#Parameter NameData TypeFormatLengthDescriptionPresence
1requestToPayIdString30Unique request to pay id generated by central componentM
2originatorUniqueIdString20Unique id generated by originatorM
3responseCodeStringResponse code for request to pay receiptM
4responseMessageStringHuman-readable text for response codeO
5TimestampYYYYMMDDHHmmssSSSM
6tokenSHA256 signatureM

Sample Response:

{ 
"timeStamp": "2021-03-14 11:38:43",
"responseCode": 200,
"responseMessage": "Received Successfully",
"requestToPayId": "KHA20210314172343903D14AbMFiXa",
"originatorUniqueId": "20787899710",
"token": "<token Signature>"
}

Token String:

REQUESTTOPAYID:requestToPayId,

ORIGINATORUNIQUEID:originatorUniqueId,

RESPONSECODE:responseCode,

RESPONSEMESSAGE:responseMessage

10.1.5. Request from Payer Agent to NPI (Financial Messages)

Post method: /r2p/v1/payment

Request Parameters

#Parameter NameData TypeFormatLengthDescriptionPresence
1requestToPayIdString30Unique id to identify the request to pay message in processing.M
2originatorUniqueIdString20This will be mapped to unique ID of the message.M
3payerResponseENUM1A: Accepted, R: RejectedM
4payerMessageString100Payer will have the option to add/edit/modify the purpose field. The same will be reflected in the response message.O
5debitBankAccountString20Account number of the participant that needs to be debited.M
6debitBankCodeString4Account holding bank of the participant.M
7debitBranchCodeString4Branch of debit account.M
8senderNameStringName of the sender of the fund.M
9TimestampYYYYMMDDHHmmssSSSTime of acting on the request.M
10AmountBigDecimalAmount accepted as original or modified by the payer.M
11canAmountVaryENUMY Or NFlag to indicate flexible or fixed amount to be accepted by the payer. Flag that stands sending amount can be more or less than requested (Y-Yes, N-No).M
12TokenSHA256 signature of mandatory fields.M

Sample Request

{ 
"requestToPayId": "Kha20210423124503516jqUY1Tf1w4",
"originatorUniqueId": "20787899710",
"payerRespone": "A",
"payerMessage":"honored",
"debitBankAccount": "01245454548784454545",
"debitBankCode": "2301",
"debitBranchCode": "01",
"senderName":"Sabin",
"timestamp": "2021-03-15 12:49:43",
"Amount":"10.00",
"canAmountVary": "N",
"token": "<Signature Token>"
}
Token String="requestToPayId+","+originatorUniqueId+","+payerResponse+","+debitBankAccount+","+debitBankCode+","+npiuserId " 

10.1.6. From NPI to Payer agent Transaction Confirmation

Response Parameters

#Parameter NameData TypeFormatLengthDescriptionPresence
1requestToPayIdString30Unique Id generated by Request to pay module.M
2originatorUniqueIdString20Transaction Id generated by Payee agent.M
3acceptedRejectedFlagENUM1A for Accept, R for Reject.M
4debitBankAccountString20Actual debit account. Mandatory if acceptRejectedFlag A.C
5debitBankCodeString4Actual debit bank code. Mandatory if acceptRejectedFlag A.C
6debitBranchCodeString4Actual debit branch code. Mandatory if acceptRejectedFlag A.C
7payBatchIdString20Transaction Batch id. Mandatory if acceptRejectedFlag A.C
8payTxnIdString20Transaction id. Mandatory if acceptRejectedFlag A.C
9debitStatusString20Transaction debit status. Mandatory if acceptRejectedFlag A.C
10creditStatusString20Transaction credit status. Mandatory if acceptRejectedFlag A.C
11AmountBigDecimalActual transaction amount. Mandatory if acceptRejectedFlag A.C
12canAmountVaryENUM1Y indicates transaction amount had varied than requested amount. Mandatory if acceptRejectedFlag A.C
13senderNameString200Name of sender.M
14payerMessageString100Message by payer.O
15TimestampDateyyyy-MMdd hh:mm:ssTime.M
16notificationStatusStringNotification status sent to originating participant.M
17TokenStringFor integrity of message.M

Sample Request Message:

{
"requestToPayId":"NMB2212280001408YFFB",
"originatorUniqueId":"R2PTXNID000000000016",
"acceptedRejectedFlag":"A",
"payBatchId":"712286151",
"payTxnId":"12612976",
"debitStatus":"000",
"creditStatus":"000",
"amount":1000,
"senderName":"RADHIKA RASAILI",
"payerMessage":"RequestToPay",
"direction":"OUTWARD",
"timeStamp":null,
"token":null
}
Token String=“requestToPayId+","+originatorUniqueId+","+acceptedRejectedFlag+","+payBatchId+","+payTxnId+","+debitStatus+","+creditStatus+","+amount+","+senderName+","+payerMessage” 

Sample Response

{ 
"responseCode": "200",
"responseMessage": "SUCCESS",
"requestToPayId": "NMB2212280001408YFFB",
"originatorUniqueId": "R2PTXNID000000000016",
"token": null,
"timeStamp": "2022-12-28 10:53:58"
}
Token string:REQUESTTOPAYID:requestToPayId,ORIGINATORUNIQUEID:originatorUniqueId,RESPONSECODE:responseCode,RESPONSEMESSAGE:responseMessage 

10.1.7. Request from NPI to payee agent – Transaction Confirmation

NPI makes a POST request to the payee agent on its API where transaction status information is sent. Such a response must be saved by the payee at its end so that proper information is conveyed to the transaction initiating party. Transaction reports can be generated from the transaction reporting API mentioned in section 5.3 of this document.

Request Parameter:

#Parameter NameData TypeFormatLengthDescriptionPresence
1requestToPayIdString30Unique Id generated by Request to pay module.M
2originatorUniqueIdString20Transaction Id generated by Payee agent.M
3acceptedRejectedFlagENUM1A for Accept, R for Reject.M
4debitBankAccountString20Actual debit account. Mandatory if acceptRejectedFlag A.C
5debitBankCodeString4Actual debit bank code. Mandatory if acceptRejectedFlag A.C
6debitBranchCodeString4Actual debit branch code. Mandatory if acceptRejectedFlag A.C
7payBatchIdString20Transaction Batch id. Mandatory if acceptRejectedFlag A.C
8payTxnIdString20Transaction id. Mandatory if acceptRejectedFlag A.C
9debitStatusString20Transaction debit status. Mandatory if acceptRejectedFlag A.C
10creditStatusString20Transaction credit status. Mandatory if acceptRejectedFlag A.C
11AmountBigDecimalActual transaction amount. Mandatory if acceptRejectedFlag A.C
12amountVaryFlagENUM1Y indicates transaction amount had varied than requested amount. Mandatory if acceptRejectedFlag A.C
13senderNameString200Name of sender.M
14payerMessageString100Message by payer.O
15TimestampDateyyyy-MM-dd hh:mm:ssTime.M
16TokenStringFor integrity of message.M

Sample Request:

{ 
"requestToPayId": "NMB2212280001408YFFB",
"originatorUniqueId": "R2PTXNID000000000016",
"acceptedRejectedFlag": "A",
"payBatchId": "712286151",
"payTxnId": "12612976",
"debitStatus": "000",
"creditStatus": "000",
"amount": 1000,
"senderName": "RADHIKA RASAILI",
"payerMessage": "RequestToPay",
"direction": null,
"timeStamp": null,
"token": null
}

Token String: REQUESTTOPAYID:requestToPayId,ORIGINATORUNIQUEID:originatorUniqueId,ACCEPTEDREJECTEDFLAG:acc eptedRejectedFlag,PAYBATCHID:payBatchId,PAYTXNID:payTxnId,DEBITSTATUS:debitStatus,CREDITSTATUS:cre ditStatus,AMOUNT:amount,SENDERNAME:senderName,PAYERMESSAGE:payerMessage

Sample Response:

{
"requestToPayId":"NMB2212280001408YFFB",
"originatorUniqueId":"R2PTXNID000000000016",
"responseCode":"200",
"responseMessage":"Success",
"timeStamp":"2022-12-28 10:53:49",
"token":"qmyw6otF2QZ1fwR8XFPBCa6fhvH/xNpIbep6V8pIHMe/z+RimCGhtjT3+qqnYExlHSFtgs3kNodXn7dmchju+JgFtMyr85AFwiZucAd7GuWj019EnF53TkqYpnjB50aQj23hIgjAg43se7FZCZd6ohWXSjW2kpb7jE9NUcT+D9g\u003d"
}

Token String: REQUESTTOPAYID:requestToPayId,ORIGINATORUNIQUEID:originatorUniqueId,RESPONSECODE:responseCode, RESPONSEMESSAGE:responseMessage

E-Mandate/Account Tokenization Based R2P

Process Flow

  1. E-Mandate is a tokenized digital consent authorized by Payer (debtor) allowing a Payee (creditor/ beneficiary party) to debit an amount from the specified Payer’s debit account at predefine date or on request as set in the e-Mandate.
  2. Pre-requisite for initiating and processing R2P is that the Payee Agent will have to enable e-Mandate based R2P in its channel/ instrument which will be integrated with e-Mandate Tokenization Gateway to obtain tokenized e-Mandate. E-Mandate is mandatory for initiating and processing direct debit transactions.
  3. Payer will setup and authorize one-time e-Mandate through a channel provided by its Payer Agent (which could be indirect/ technical member or service provider).
  4. The Payer will verify the details and then completes authentication and authorization through e-Mandate Tokenization Gateway available at Payer Agents channel.
  5. Payer Agent channel will then receive a tokenized e-Mandate, which will be used to honor all future R2P requests against the mandate.
  6. On due date or upon request, the Payee or Payee Agent will initiate a R2P request (debit instruction) based on the authorized mandate details using e-Mandate token, financial message token, debit amount, payee app id and other payment information.
  7. NPI will authenticate the Payee Agent (as member) and then validate the request prior to debiting the payer account and crediting the payee account.
  8. Based on nature of transaction or channel used, Payer Agent may add control for additional authentication (like OTP or authenticator-based code or similar) that may be required to complete the financial transaction. Such OTP generation as additional control will be the responsibility of the Payer Agent.
  9. The transaction status will then be transmitted to Payee Agent and Payee.

Third party application should web post to tokenization web gateway hosted at NCHL with the parameters listed in the following table.

10.2.1. Tokenization Gateway

URL:{base_url}/tokenization-gw/loginpage

Method: POST

Request data:x-www-form-urlencoded

Request Parameters

#ParameterData TypeLengthDescriptionPresence
1participantIdStringMax. 25Participant id provided to third party system by NCHL for tokenization serviceM
2identifierStringMax. 50Unique identifier generated in third party system for tracing purpose.M
3userIdentifierStringMax. 200User identifier in third party system.M
4mobileNoString10Customer mobile number registered in third party system. Mobile number should match with the mobile number used in connectIPS.M
5emailStringMax. 200Customer email address registered in third party system. Email address should match with the email address used in connectIPS.M
6amountNumeric (8,2)Amount (only two digits after decimal point)M
7debitTypeString1F-fixed (Same amount will be requested for every Direct Debit initiation) V-Variable (Amount up to the value in “amount” will be requested for every Direct Debit initiation)M
8frequencyStringMax. 2Frequency for Direct Debit initiation.1-Daily 2-Weekly 3-Monthly 4-Quaterly 5-Half Yearly 6-Yearly 7-As & When PresentedM
9mandateStartDateString8Date from when the service should be enabled. Date in a format YYYY-MM-DDM
10mandateExpiryDateString8Date up to which the service should be active. This should be small or equals to the maximum token expiry period enforced by NCHL. If greater date value is provided, will be defaulted to the maximum allowed date. Date in a format YYYY-MM-DDM
11autoRenewalBoolean (true/false)Auto renewal of E-mandate upon expiry. Auto renewal flag will be available only for specific membersC
12tokenStringBase64 Signature token generated through signing the token string by participant private key. Signature algorithm is SHA256withRSA. UTF-8 is the encoding algorithm.M

Token String= participantId+”,” + identifier+”,” + userIdentifier +”,” + mobileNo+”,” +email+”,” +amount+”,” +debitType+”,” +frequency+”,” +mandateStartDate+”,” + mandateExpiryDate

After successful request validation, the user is prompted for further processing. In case of connectIPS user, s/he provide his credentials to get into the connectIPS channel. After successful login the user will be provided with the information in the mandate to reconfirm. The user finds all his/her active linked bank accounts in the list from which s/he can choose for tokenization. On user OTP verification, the user will be redirected to the member’s web application from connectIPS gateway. For this, the member needs to provide a pair of URLs; successURL and failureURL which will be mapped at NCHL’s end. Parameters “participantId” and “identifier” will be appended along with the return URL.

Success_URL:http://successurl.com.np/Modules/EMandate/E_Mandate_Register.aspx?participantId=ABCD@999&identifier=EMTXNID000000000426&userIdentifier=40

Failure_URL:http://failureurl.com.np/Modules/EMandate/E_Mandate_Register.aspx?participantId=ABCD@999&identifier=EMTXNID000000000426&userIdentifier=40

Along with these details, connectIPS will also be posting an e-mandate to an API shared by the member with the following request parameters. The API must be reachable from NCHL’s end in order to make a post request in it. The request will contain below parameters. In case the user is not a connectIPS user, different authentication and authorization mechanism will be implemented.

Request Parameters

#ParameterData TypeLengthDescriptionPresence
1participantIdStringMax. 25Participant id provided to third party system by NCHL for tokenization service.M
2identifierStringMax. 50Unique identifier generated in third party system for tracing purpose.M
3userIdentifierStringMax. 200User identifier in third party system.M
4mobileNoString10Customer mobile number registered in third party system. Mobile number should match with the mobile number used in connectIPS.M
5emailStringMax. 200Customer email address registered in third party system. Email address should match with the email address used in connectIPS.M
6amountNumeric(8,2)Amount (only two digits after decimal point).M
7debitTypeString1F - fixed (Same amount will be requested for every Direct Debit initiation). V - Variable (Amount up to the value in "amount" will be requested for every Direct Debit initiation).M
8frequencyNumericMax. 2Frequency for Direct Debit initiation.M
9mandateStartDateString8Date from when the service should be enabled. Date in a format YYYY-MM-DD.M
10mandateExpiryDateString8Date up to which the service should be active. Date in a format YYYY-MM-DD.M
11mandateTokenStringGenerated mandate token in tokenization gateway for the request.M
12mandateTokenTypeString1T - Temporary F - Fully Working (For temporary type token, third party should request designated API in NPI with required parameters to get fully working mandate)M
13entryIdStringMax. 20Unique alphanumeric ID in tokenization gatewayM
14mandateTokenNicknameStringMax. 50Nick name for the tokenized eMandateM
15bankNameString100Tokenized account’s bank nameM
16bankIdString4Tokenized account’s bank idM
17tokenStringBase64 Signature token generated through signing the token string by NCHL private key. Signature algorithm is SHA256withRSA. UTF8 is the encoding algorithm.M

Token String= participantId+”,” + identifier+”,” + userIdentifier +”,” + mobileNo+”,” +email+”,” +amount+”,” +debitType+”,” +frequency+”,” +mandateStartDate+”,” + mandateExpiryDate+”,” + mandateToken+”,”+ mandateTokenType

Sample Request from NCHL:

{
"identifier":"EMTXNID000000000421",
"amount":"1000.00",
"debitType":"F",
"bankName":"NMB Bank Limited",
"mobileNo":"9849428177",
"mandateStartDate":"2022-08-28",
"mandateExpiryDate":"2023-01-28",
"mandateTokenNickName":"*****017",
"mandateTokenType":"F",
"frequency":"1",
"entryId":360,
"token":"UHvN8VdYL8CwzXDpG8v7ZbhO33fbRUBJPFPDIKbZTbqYeQirXLLoQ9U/zBf2YHMTknxvNbaJigk8K5C43S3N6uf6uZ+Zo9+IgZRrLvE2iH7EGt4aPMNkNzjCn4qJpdLXpt8U4JZMcuDsziowezSy+qBsN3k4TDv5HZZn1ZuqkOs=",
"participantId":"SIDDCAPITAL@999",
"bankId":"2501",
"userIdentifier":"1301090078415599",
"mandateToken":"STnmKc2aRA2GhA4VeLzlBKVCm7sCBvXxfJ2q8aKRxOJVfoRqyukBMYTU3dw7rWkD5LnnGmekXTCjLqT9MQt3GUjutNA/9MId78G771wrJz82LzbYKZLWb7ANCd8MTBl0B1x1LLf0bVBOmTig9uip1w==",
"email":"ali.rajim12@gmail.com"
}

Following is a successful response sample from third party system to NCHL for getting e-Mandate API call.

{ 
"responseCode": "000",
"responseMessage": "SUCCESS",
"data": {
"identifier": "EMTXNID000000000421",
"participantId": "SIDDCAPITAL@999",
"entryId": "360",
"token": "<signature token of (identifier+ ',' + participantId+ ',' +entryId)>"
},
"error": []
}

Sample response for failure case:**

{ 
"responseCode": "111",
"responseMessage": "FAILED",
"data": {
"identifier ": "EMTXNID000000000421",
"participantId": "SIDDCAPITAL@999",
"entryId": "360",
"token": "<signature token of (identifier+ ',' + participantId+ ',' +entryId)> "
},
"error": []
}

10.2.2. Stage payment

In order to initiate payment request in NPI, payee participant channel should first obtain payment token from the e-Mandate token.

POST URL: {base_url}/tokenization/stagepayment

Request Parameters:

#ParameterData TypeLengthDescriptionPresence
1participantIdStringMax. 25Participant id provided to third party system by NCHL for tokenization serviceM
2mandateTokenStringFully working e-Mandate tokenM
3userIdentifierStringMax. 200User identifier in third party systemM
4amountNumeric(8,2)Transaction amountM
5appIdStringMax. 30App Id registered in connectIPS to whom the payment is being done. App ID is related to bank account where amount from payer is to be collected.M
6instructionIdStringMax. 20Unique identifier to trace the requestM
7refIdString35Reference for the paymentM
8particularsString30Particulars for the paymentO
9remarksString30Remarks for the paymentO
10addnField1String100Field for future useC
11addnField2String100Field for future useC
12tokenStringBase64 Signature token generated through signing the token string by participant private key. Signature algorithm is SHA256withRSA. UTF-8 is the encoding algorithm.M

Token String= ”participantId+”,” + mandateToken +”,” + userIdentifier +”,” + amount +”,” + appId +”,” + instructionId+”,” + refId +”,”+ npiuserId”

Sample Request:

{
"participantId":"MOCO@999",
"mandateToken":"X/TAuhjeD/bKIx5Jcezbx5IDC2zgH/YS57sFs038tSsxgcAfzM4nkUH/3eZ/MoudaQmfdXNUEJdtYQ9da6dQGyfYPBu3zvQQPKbOAi7XVHRxVP4PWeIT4/7/mUsxGroM",
"userIdentifier":"ROSAN38",
"amount":10.00,
"appId":"GON-7-TVRS-1",
"instructionId":"123456",
"refId":"123",
"particulars":"test",
"remarks":"test",
"addnField1":"",
"addnField2":"",
"token":"oMmv193tR7iF3GxAry6dOoQb9ei8haAQ+kg+Hwo9qjOjcsNJLChds/OfwOALiPGR4fJ/2KPZsagj8TE0NWSjLxIRhaj8OPAdxdLIGAe3jVYnUkomxoJE1ojTS5Yr1er1CTEsqgJSNpSrjDMvVkRHFeSUIrodgJRvlZYaZQ70HKXSC9k/BK2YVNN2TsFAoPeNbQJ9vlFTdZGuCqe5VUInNbekH3Q2+5yH4wDKXyqlSP2yjRLZeaDDosyn0oSgfzPxcEePQHPwb3fOBoOGm9zrEWAkP4QRgPodcoe0AFdZFAEsa1AroZQPpCdTRyKX1mRqnDWAXjWo8k5kK/ZOtEXDgw=="
}

Success Response

{
"responseCode":"000",
"responseMessage":"SUCCESS",
"recDate":"20220505035359672",
"participantId":"MOCO@999",
"paymentToken":"Reo6eUBmpmy4WgVWVAgjXAqs2vLNqqzrEfQgWaV1U2WvbRKK0617oCYZaHfIPCCCYMucqk6lzQw3ivGxLnK4ytk1gTprC0V3kWc9wjKe0KomZP1VMLsHJ60J90O6M0Ak2OwtIYUA1Vq/ROMcKbiv6MnptlkliQJQcZKfpnPtlBjssVsEuNxAEUpJoMIzKYErqeg/pgIycet7Um3+WHAHPw==",
"amount":10.00,
"chargeAmount":2.00,
"chargeLiability":"CG",
"appId":"GON-7-TVRS-1",
"instructionId":"123456",
"refId":"123",
"particulars":"test",
"remarks":"test",
"addnField1":"",
"addnField2":"",
"secondaryAuthorizationRequired":"Y",
"token":""
}

Failure response:

{
"responseCode":"400",
"responseStatus":"INVALID ACCOUNT",
"responseMessage":"Invalid Account Detail.",
"responseData":{

},
"responseErrors":[

]
}
Or
{
"responseCode":"E003",
"responseMessage":"INVALID TOKEN",
"data":"",
"classfielderrorlist":[

]
}

NCHL will respond with the following parameters:

#ParameterData TypeLengthDescriptionPresence
1responseCodeStringMax. 10Response code for the request. 000 is successM
2responseMessageStringMax. 200Human-readable text for the response codeM
3recDateString17YYYYMMDDHHmmssSSSM
4participantIdStringMax. 25Participant id provided to the third-party system by NCHL for tokenization serviceM
5paymentTokenStringPayment token to be used for the payment requestM
6amountNumeric(8,2)Transaction amountM
7chargeAmountNumeric(8,2)Charge for performing the transactionM
8chargeLiabilityString2CG - Customer will bear the applicable charge (principle + charge amount will be deducted). MN - Merchant will bear the charge. (Merchant will receive principle-charge amount). MG - Merchant will bear the charge. (Merchant will receive principle amount. Charge will be deducted separately [Special arrangement by participant’s bank])M
9appIdStringMax. 30App Id registered in connectIPS to whom the payment is being done.M
10instructionIdStringMax. 20Unique identifier to trace the request.M
11refIdString30Reference for the payment.M
12particularsString30Particulars for the paymentO
13remarksString30Remarks for the paymentO
14addnField1String100Field for future useC
15addnField2String100Field for future useC
16secondaryAuthorizationRequiredString1Y - OTP or any other secondary authorization required for payment processing. N - Transaction requires no further authorizationM
17tokenStringBase64 Signature token generated through signing the token string by NCHL private key. Signature algorithm is SHA256withRSA. UTF-8 is the encoding algorithm.M

Token String = participantId+”,”+paymentToken+”,”+amount+”,”+appId+”,”+instructionId+”,”+ secondaryAuthorizationRequired +”,” + responseCode ”,”+ npiuserId

10.2.3. Request payment

With the payment token received in the response, a new request should be made in the below API within stipulated time. Current time limitation is 5 minutes i.e., request payment API has to be called within 5 minutes of calling the stage payment API.

URL: {base_url}/tokenization/requestpayment

Method: POST

Request data: JSON

Request parameters:

#ParameterData TypeLengthDescriptionPresence
1participantIdStringMax. 25Participant id provided to third party system by NCHL for tokenization serviceM
2paymentTokenStringPayment token received from payment stagingM
3authorizationTokenStringOTP or any other authorization token if secondaryAuthorizationRequired is ‘Y’ during stagingC
4amountNumeric(8,2)Transaction amountM
5appIdStringMax. 30App Id registered in connectIPS to whom the payment is being doneM
6tokenStringBase64 Signature token generated through signing the token string by participant private key. Signature algorithm is SHA256withRSA. UTF-8 is the encoding algorithmM

Token String= ”participantId+”,” + paymentToken +”,” + amount +”,” + appId +”, ” npiuserId”

Response parameters:

#ParameterData TypeLengthDescriptionPresence
1responseCodeStringMax. 10Response code for the request. 000 is successM
2responseMessageStringMax. 200Human readable text for the response codeM
3participantIdStringMax. 25Participant id provided to third party system by NCHL for tokenization serviceM
4paymentTokenStringPayment token received from payment stagingM
5debitStatusString30Payer account debit statusM
6creditStatusString30Payee account credit statusM
7amountNumeric(8,2)Transaction amountM
8appIdStringMax. 30App Id registered in connectIPS to whom the payment is being doneM
9txnId12714868
10debitDescriptionSUCCESS
11creditDescriptionSUCCESS
12tokenStringBase64 Signature token generated through signing the token string by NCHL private key. Signature algorithm is SHA256withRSA. UTF-8 is the encoding algorithmM

Token String= participantId+”,” + paymentToken +”,” + amount +”,” + appId +”,”+ debitStatus+”,”+ creditStatus+”,”+ responseCode”,”+ npiuserId

10.2.4. Token Cancellation

A cancellation API will be available in NPI to cancel the e-Mandate token.

POST URL: {base_url}/tokenization/cancel

Request type: application/json

Request parameters:

S.NParameterData TypeLengthDescriptionRemarks
1participantIdString25Participant id provided to third party system by NCHL for tokenization serviceM
2identifierStringMax. 50Unique identifier provided during e-Mandate request initiationM
3userIdentifierStringMax. 200User identifier in third party systemM
4mandateTokenStringe-Mandate token provided by tokenization gateway for the initial requestM
5cancelReasonCodeString10Reason Code to cancel the MandateM
6cancelReasonMessageString200Human-readable message for the cancellation reason codeM
7tokenStringBase64 Signature token generated through signing the token string by participant private key. Signature algorithm is SHA256withRSA. UTF-8 is the encoding algorithmM

Token String= participantId+”,” + identifier+”,” + userIdentifier +”,” +mandateToken+”,” + cancelReasonCode” +”,” + npiuserId”

Sample Request:

{ 
"participantId": "MOCO@999",
"identifier": "12345",
"userIdentifier": "98******769",
"mandateToken": "mandatetoken",
"cancelReasonCode": "INVALID_AC",
"cancelReasonMessage": "Invalid Account Number",
"token": "randomToken"
}

Response Parameters:

S.NParameterData TypeLengthDescriptionRemarks
1responseCodeString10Reason code for the cancel request. 000-SuccessM
2responseMessageString200Human-readable message for the response codeM
3participantIdString25Participant id provided to third party system by NCHL for tokenization serviceM
4identifierStringMax. 50Unique identifier provided during e-Mandate request initiationM
5userIdentifierStringMax. 200User identifier in third party systemM
6mandateTokenStringe-Mandate token provided by tokenization gateway for the initial requestM
7cancelReasonCodeString10Reason Code to cancel the MandateM
8cancelReasonMessageString200Human-readable message for the cancellation reason codeM
9tokenStringBase64 Signature token generated through signing the token string by NCHL private key. Signature algorithm is SHA256withRSA. UTF-8 is the encoding algorithmM

Token String= participantId+”,” + identifier+”,” + userIdentifier +”,” +mandateToken+”,” + cancelReasonCode+”,” +
responseCode+”,”+ npiuserId”

Sample Response:


{
"participantId": "MOCO@999",
"identifier": "12345",
"userIdentifier": "98******769",
"mandateToken": "mandatetoken",
"cancelReasonCode": "000",
"cancelReasonMessage": "SUCCESS",
"token": "randomToken"
}

10.2.5. Re-new Token

A re-new API is available in NPI to renew the expired e-Mandate token. The condition for this is that the mandate token should be expired.

POST URL: /tokenization/renew

Request type: application/json

Request parameters:

S.N.ParameterData TypeLengthDescriptionPresence
1participantIdString25Participant id provided to third-party system by NCHL for tokenization serviceM
2mandateTokenStringe-Mandate token provided by tokenization gateway for the initial request.M
3tokenStringBase64 Signature token generated through signing the token string by participant private key. The signature algorithm is SHA256withRSA. UTF-8 is the encoding algorithm.M
Token String= participantId+”,” + mandateToken+”,” + NPIUserId”

Sample Request:


{
"participantId": "SIDP1",
"mandateToken": "rHrZnRomfk6o3+9zzPFwoABqLTpSsVp21ScHhTusmsOr+O9YmMMhdlHINIFPoQeRHNcBk+ZTkIJTIJgNo8HKSsElSq0vDOvjuitqacT7Tmk=",
"token": "SwtBaX2p2ZEWi3yS33yfzqKZJvET7NzGLDy3urHEY5Leb1mhhprGNlDDCz05Srb1pNoQNjIGCp4fWuQLF2/UWupLY4ze7WcO2EehaVJGFNwtotqJR3FYsxbeu/OACEJssq0s0Tft1GZ9ya2/HCGfbkpv79abMyuNs+CHdSXhKaQ="
}

Response Parameters:

S.N.ParameterData TypeLengthDescriptionPresence
1responseCodeString10Response code for the request. "000" is success, otherwise, it's failed.M
2responseMessageStringHuman-readable text for the response code.M
3participantIdString25Participant ID provided to third-party system by NCHL for tokenization service.M
4mandateTokenStringNew e-Mandate token provided by tokenization gateway for the renew request.M
5startDateString8Date from when the service should be enabled. Date in a format YYYY-MM-DD.M
6expiryDateString8Date up to which the service should be active. Date in a format YYYY-MM-DD.M
7responseStatusStringStatus of request.M

Sample Response:

Success response:

{ 
"responseCode": "000",
"responseData": {
"participantId": "SIDP1",
"mandateToken": "lS7GyvqP6O/wocSj8kDMUoAGpIMiqVi9OkVuEzgIY2ueE5PQMEAJI0azSGiyiuirSb1eRBRJCVpZDCQmKWSCuqRv7Pvv+gF3drbB/2AA3taPVosGvwuoWRaN6ugq4+v5qQLTmlp3AxxbFo34klHUYw==",
"startDate": "2024-03-27",
"expiryDate": "2024-09-23"
},
"responseStatus": "SUCCESS"
}

Failure Cases:

Case I: When the user mandate is active.

{ 
"responseCode": "T016",
"responseMessage": "Requested mandate token is in active state.",
"responseStatus": "FAILED"
}

Case II: When the mandate token is invalid.

{ 
"responseCode": "T015",
"responseMessage": "Invalid Mandate Token",
"responseStatus": "FAILED"
}

Case III: Participant is enabled for auto-renewal.

{ 
    "responseCode": "T014",
    "responseMessage": "Participant enabled for auto-renewable.",
    "responseStatus": "FAILED"
}

Response Codes:

Response codeDescription
000Success
T014Participant enabled for auto-renewable.
T015Invalid Mandate Token
T016Requested mandate token is in an active state.

10.2.6. Exception Handling

Following exceptions must be handled at the technical member’s end:

  1. If a transaction is debit success and credit failed. New payment has to be initiated (requestPayment api has to be called again). Reversal of the transaction takes place in case of debit success and credit failed which is handled from connectIPS end.
  2. If a transaction is debit success and credit timeout (999), then no initiation of a new payment is to be done. If a transaction is not debit successful (000) in the response of request Payment API, then new transaction must be created.