0% found this document useful (0 votes)
17 views

Charge API

Uploaded by

Akash Dhamdhere
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
17 views

Charge API

Uploaded by

Akash Dhamdhere
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 6

CHARGES API

Charges API

PART I: INTRODUCTION
This API is used for creating manual charges against an application at LMS side.

PART II: ABOUT Charges API


The description and specific workflow of Charges API is as follows:
1. Partner need to send the particular mandatory parameters in the request along
with the Authentication mechanism.
2. If the “accountId” of the customer is valid , then following are the cases:
The partner provides details to be updated.

PART III: API GUIDE


API NAME Charges API
URL https://b2bpartner-api-uat.abfldirect.com/createCharges
HEADERS Content-Type : application/json
Partner specific (X-AUTH-TOKEN , X-API-KEY etc.)

P.S. – URL is case-sensitive


e.g.
a.) For X-AUTH-TOKEN –
{
“Content-Type: application/json”,
“X-AUTH-TOKEN: token_generated_from_token_api”
}
PART IV: REQUEST
The request should contain following parameters:

Parameter Description Type of variable MANDATORY/NON-


Name and condition MANDATORY
on it
accountId Application Id at partner  Type - String  MANDATORY
side
transactionId Just a unique value for  Type - String  MANDATORY
each request
dealNo Deal No generated by  Type - String  MANDATORY
sanction api
laonNo Loan Number of the  Type - String  NON-MANDATORY
customer
partnerLoanNo Partner Loan no if it exists  Type - String  NON-MANDATORY
chargeType Charge Type  Type - String  NON-MANDATORY
 Allowed values
[“R”, “P”]
 “R” indicates
Receivable
 “P” indicated
Payable
chargeCode Charge Code (106 – PF,  Type - String  MANDATORY
617 – Subvention, 901 –
Risk Pool)
taxInclusive Whether tax inclusive or  Type - String  MANDATORY
not  Allowed values
[“Y”, “N”]
 “Y” indicates YES
 “N” indicates NO
chargeAmount Charge amount  Type - String  MANDATORY
taxRate1 Tax rate 1  Type - String  NON-MANDATORY
taxRate2 Tax rate 2  Type - String  NON-MANDATORY
finalAmount Final Amount  Type - String  NON-MANDATORY
chargeMethod Charge Method  Type - String  NON-MANDATORY
 Allowed values
[“P”, “F”]
“P” indicates Percent
“F” indicates Flat
businessPartne BusinessPartner Type  Type - String  NON-MANDATORY
rType
PART V: SAMPLE REQUEST

{
"transactionId": "B1282466",
"accountId": "BL1282",
"dealNo": "DXW-M08622-230001956",
"loanNo": "LXW-M08622-230001022",
"chargeMethod": "F",
"chargeAmount": 100,
"taxRate1": 9,
"taxInclusive": "N",
"taxRate2": 9,
"finalAmount": 200,
"chargeCode": "110"
}

PART VIII: SAMPLE RESPONSES

CASE CONDITION RESPONSE STATUS CODE


1.Success When { 200
Successfully "responseStatus":"SUCCESS",
hit "data":{
Drawdown "lenderTransaction":{
api "partnerId":"22",
"txnId":"Z1234567890",
"LanNumber":"L1234567890",
"accountId":"A1234567890",
"timestamp":"2021-01-06T11:04:04.146Z",
"status":"SUCCESS",
"nextEmiDueDate":"2021-01-06"
}
}
}
1 . Failure When { 404
invalid "responseStatus": "ERROR",
accountId "error": {
is sent "code": "INVALID_APPLICATION",
"description": "Application doesn't exist"
}
}
When any of "responseStatus": "ERROR", 400
mandatory "error": {
field is not "code": "BAD_REQUEST",
present "description": "transactionId key is missing",
"errorType": "MISSING_TRANSACTION_ID"
}
}
When any of { 400
field is left "responseStatus": "ERROR",
blank, which "error": {
can’t be left "code": "BAD_REQUEST",
blank "description": "transactionId can not be empty",
"errorType": "INVALID_PAYLOAD"
}
}
If both { 400
loanNo and "responseStatus": "ERROR",
partnerLoan "error": {
No is passed "code": "BAD_REQUEST",
in request "description": "Either loanNo or partnerLoanNo is
required not both",
"errorType": "BOTH_NOT_REQUIRED"
}
}
When { 404
dealNo "responseStatus": "ERROR",
passed in "error": {
the request "code": "BUSINESS_RULE_ERROR",
doesnot "description": "Deal No is not valid",
matches "errorType": "INVALID_DEAL_NO"
with the }
dealNo }
saved in the
db while
hitting
sanction api
When "responseStatus": "ERROR", 404
loanNo "error": {
passed in "code": "BUSINESS_RULE_ERROR",
the request "description": "INVALID_LOAN_NO"
doesnot }
matches }
with the
laonNo
saved in the
db while
hitting
drawdown
api

Unable to { 502
generate “responseStatus”: “ERROR”,
LMS tokens
“error”:
from LMS
API {
“code”: “DEPENDENCY_ERROR”,
“description”: “Unable to Generate LMS Token”,
“errorType”:“INTERNAL_API_FAILED_TO_RESPOND

}
}
Technical { 500
Issues “responseStatus”: “ERROR”,
“error”:
{
“code”: “INTERNAL_SERVER_ERROR”,
“description”: “SOMETHING_WENT_WRONG”,
“errorType” : “INTERNAL_SERVER_ERROR”
}
}

You might also like