Skip to content

Commit efae89f

Browse files
tanmay-dixittanmay
and
tanmay
authored
BBPS API V1.1 Feature Enhancements (#185)
* bill payment: rename paymentParams to selectedPaymentOptions * Update selectedPaymentOptions description/examples * add bills to bill payment request * add bills to billPaymentResponseData * update exactness in fetch response * update exactness in list billers API * fix formatting * add biller selection type and biller response type to fetch response and list billers APIs * minor fixes to objects.mdx - add bills schema - add bills to payment response - use lower case of biller fields * add bills and payment options to bill fetch response * Added billerResponseType note * add bill details to successful fetch and payment events * add bills to transactions * json formatting fix to api-integration.json * update fetch response example * Revert "fix formatting" This reverts commit 8d8a0c2. * add selectedPaymentOptions to objects.mdx * improvements to objects.mdx * update api ref examples --------- Co-authored-by: tanmay <tanmay@setu.co>
1 parent b05e079 commit efae89f

File tree

8 files changed

+570
-108
lines changed

8 files changed

+570
-108
lines changed

api-playground/json/payments/billpay/api-integration/PaymentRequest.json

+12-2
Original file line numberDiff line numberDiff line change
@@ -33,13 +33,23 @@
3333
],
3434
"mobile": "9481773053"
3535
},
36+
"bills": [
37+
{
38+
"billNumber": "4705299027986032967",
39+
"amount": 3000
40+
},
41+
{
42+
"billNumber": "3056665275489131002",
43+
"amount": 7000
44+
}
45+
],
3646
"paymentDetails": {
3747
"amount": 10000,
3848
"mode": "Internet Banking",
39-
"paymentParams": [
49+
"selectedPaymentOptions": [
4050
{
4151
"name": "Early Payment Amount",
42-
"value": "100"
52+
"amount": 10000
4353
}
4454
],
4555
"paymentRefId": "BD019181220291",

api-references/payments/billpay.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -1508,7 +1508,8 @@
15081508
"QUARTERLY",
15091509
"HALFYEARLY",
15101510
"YEARLY",
1511-
"ASPRESENTED"
1511+
"ASPRESENTED",
1512+
"NA"
15121513
],
15131514
"type": "string",
15141515
"example": "ONETIME",

api-references/payments/billpay/api-integration.json

+195-29
Original file line numberDiff line numberDiff line change
@@ -1606,9 +1606,28 @@
16061606
},
16071607
"x-go-name": "BillAdditionalInfo"
16081608
},
1609+
"bill": {
1610+
"type": "object",
1611+
"required": [
1612+
"billNumber",
1613+
"amount"
1614+
],
1615+
"properties": {
1616+
"billNumber": {
1617+
"type": "string",
1618+
"example": "B123456",
1619+
"description": "Unique identifier for the bill"
1620+
},
1621+
"amount": {
1622+
"type": "integer",
1623+
"example": 450000,
1624+
"minimum": 1,
1625+
"description": "Amount to be paid for the bill in paise"
1626+
}
1627+
}
1628+
},
16091629
"billData": {
16101630
"required": [
1611-
"amount",
16121631
"billDate",
16131632
"billNumber",
16141633
"billPeriod",
@@ -1619,7 +1638,7 @@
16191638
"properties": {
16201639
"amount": {
16211640
"type": "integer",
1622-
"example": 120000
1641+
"example": 1000
16231642
},
16241643
"billDate": {
16251644
"type": "string",
@@ -1633,14 +1652,16 @@
16331652
"billPeriod": {
16341653
"type": "string",
16351654
"enum": [
1636-
"Onetime",
1637-
"Daily",
1638-
"Weekly",
1639-
"BiMontly",
1640-
"Monthly",
1641-
"Quarterly",
1642-
"HalfYearly",
1643-
"AsPresented"
1655+
"ONETIME",
1656+
"DAILY",
1657+
"WEEKLY",
1658+
"BIMONTHLY",
1659+
"MONTHLY",
1660+
"QUARTERLY",
1661+
"HALFYEARLY",
1662+
"YEARLY",
1663+
"ASPRESENTED",
1664+
"NA"
16441665
]
16451666
},
16461667
"customerName": {
@@ -1651,6 +1672,32 @@
16511672
"type": "string",
16521673
"format": "date",
16531674
"example": "2021-09-24"
1675+
},
1676+
"label": {
1677+
"type": "string",
1678+
"example": "Advance EMI",
1679+
"description": "Label for the bill"
1680+
},
1681+
"minAmount": {
1682+
"type": "integer",
1683+
"example": 1,
1684+
"description": "Minimum amount that can be paid for this bill in paise"
1685+
},
1686+
"maxAmount": {
1687+
"type": "integer",
1688+
"example": 10000,
1689+
"description": "Maximum amount that can be paid for this bill in paise"
1690+
},
1691+
"amountMultiple": {
1692+
"type": "integer",
1693+
"example": 100,
1694+
"description": "Bill payment amount should be multiple of this value in paise"
1695+
},
1696+
"paymentOptions": {
1697+
"type": "array",
1698+
"items": {
1699+
"$ref": "#/components/schemas/paymentOptionItem"
1700+
}
16541701
}
16551702
},
16561703
"x-go-name": "BillData"
@@ -1674,8 +1721,10 @@
16741721
},
16751722
"exactness": {
16761723
"type": "string",
1677-
"example": "EXACT/EXACT_UP/EXACT_DOWN/ADHOC"
1678-
},
1724+
"enum": ["Exact", "Exact and above", "Exact and below", "Any", "RANGE"],
1725+
"example": "Exact",
1726+
"description": "Specifies the range of payment amounts allowed by the biller"
1727+
},
16791728
"failureReason": {
16801729
"$ref": "#/components/schemas/bbpsFailureReason"
16811730
},
@@ -1693,6 +1742,12 @@
16931742
},
16941743
"status": {
16951744
"$ref": "#/components/schemas/status"
1745+
},
1746+
"billerResponseType": {
1747+
"$ref": "#/components/schemas/billerResponseType"
1748+
},
1749+
"billerSelectionType": {
1750+
"$ref": "#/components/schemas/billerSelectionType"
16961751
}
16971752
}
16981753
},
@@ -1734,6 +1789,25 @@
17341789
"description": "The biller ID on BBPS",
17351790
"example": "MAHI00000NATIC"
17361791
},
1792+
"bills": {
1793+
"type": "array",
1794+
"example": [
1795+
{
1796+
"billNumber": "4705299027986032967",
1797+
"amount": 3000
1798+
},
1799+
{
1800+
"billNumber": "3056665275489131002",
1801+
"amount": 7000
1802+
}
1803+
],
1804+
"description": "Details of bills(for LIST billers) for which payment was made.",
1805+
"items": {
1806+
"$ref": "#/components/schemas/bill"
1807+
},
1808+
"uniqueItems": true,
1809+
"nullable": true
1810+
},
17371811
"billerRefId": {
17381812
"type": "string",
17391813
"example": "ZA6291A177"
@@ -1784,6 +1858,8 @@
17841858
"payWithoutFetchAllowed",
17851859
"paymentChannels",
17861860
"paymentModes",
1861+
"responseType",
1862+
"selectionType",
17871863
"supportsPendingStatus"
17881864
],
17891865
"type": "object",
@@ -1836,11 +1912,9 @@
18361912
},
18371913
"exactness": {
18381914
"type": "string",
1839-
"enum": [
1840-
"Exact",
1841-
"Exact and above",
1842-
"Exact and below"
1843-
]
1915+
"enum": ["Exact", "Exact and above", "Exact and below", "Any", "RANGE"],
1916+
"example": "Exact",
1917+
"description": "Specifies the range of payment amounts allowed by the biller"
18441918
},
18451919
"fetchApiType": {
18461920
"type": "string",
@@ -1896,10 +1970,16 @@
18961970
"$ref": "#/components/schemas/planItem"
18971971
}
18981972
},
1973+
"responseType": {
1974+
"$ref": "#/components/schemas/billerResponseType"
1975+
},
18991976
"state": {
19001977
"type": "string",
19011978
"example": "TEL"
19021979
},
1980+
"selectionType": {
1981+
"$ref": "#/components/schemas/billerSelectionType"
1982+
},
19031983
"supportsPendingStatus": {
19041984
"type": "boolean",
19051985
"example": false
@@ -1911,6 +1991,20 @@
19111991
},
19121992
"x-go-name": "CouBillerDetails"
19131993
},
1994+
"billerResponseType": {
1995+
"type": "string",
1996+
"enum": ["SINGLE", "LIST", "SELECTIVE"],
1997+
"example": "LIST",
1998+
"description": "Specifies whether a biller returns a single bill or a list of bills during bill fetch",
1999+
"nullable": true
2000+
},
2001+
"billerSelectionType": {
2002+
"type": "string",
2003+
"enum": ["SINGLE", "MULTIPLE", "ALL"],
2004+
"example": "SINGLE",
2005+
"description": "In case of LIST billers, specifies the number of bills a biller allows to be paid at once",
2006+
"nullable": true
2007+
},
19142008
"billerListResponse": {
19152009
"required": [
19162010
"success",
@@ -2104,6 +2198,25 @@
21042198
"customer": {
21052199
"$ref": "#/components/schemas/customerDetails"
21062200
},
2201+
"bills": {
2202+
"type": "array",
2203+
"example": [
2204+
{
2205+
"billNumber": "4705299027986032967",
2206+
"amount": 3000
2207+
},
2208+
{
2209+
"billNumber": "3056665275489131002",
2210+
"amount": 7000
2211+
}
2212+
],
2213+
"description": "Array of bills to be paid when making payments for LIST billers. Optional for SINGLE billers.",
2214+
"items": {
2215+
"$ref": "#/components/schemas/bill"
2216+
},
2217+
"uniqueItems": true,
2218+
"nullable": true
2219+
},
21072220
"paymentDetails": {
21082221
"$ref": "#/components/schemas/paymentDetails"
21092222
},
@@ -2542,8 +2655,8 @@
25422655
"mode": {
25432656
"$ref": "#/components/schemas/paymentMode"
25442657
},
2545-
"paymentParams": {
2546-
"$ref": "#/components/schemas/paymentParameters"
2658+
"selectedPaymentOptions": {
2659+
"$ref": "#/components/schemas/selectedPaymentOptions"
25472660
},
25482661
"paymentRefId": {
25492662
"maxLength": 35,
@@ -2603,30 +2716,64 @@
26032716
}
26042717
}
26052718
},
2606-
"paymentParameterItem": {
2719+
"selectedPaymentOptionItem": {
26072720
"required": [
26082721
"name",
2609-
"value"
2722+
"amount"
26102723
],
26112724
"type": "object",
26122725
"properties": {
26132726
"name": {
26142727
"type": "string",
2615-
"description": "The display name of the parameter. This has to match what is sent in fields.",
2728+
"description": "The display name of the selected payment option from fetch response.",
26162729
"example": "Early Payment Amount"
26172730
},
2618-
"value": {
2619-
"type": "string",
2620-
"description": "The value of the payment parameter",
2621-
"example": "100"
2731+
"amount": {
2732+
"type": "integer",
2733+
"description": "The amount being paid for the selected payment option in paise.",
2734+
"example": 10000
26222735
}
26232736
}
26242737
},
2625-
"paymentParameters": {
2738+
"selectedPaymentOptions": {
26262739
"type": "array",
2627-
"description": "Additional Payment Parameters",
2740+
"description": "List of selected payment options",
26282741
"items": {
2629-
"$ref": "#/components/schemas/paymentParameterItem"
2742+
"$ref": "#/components/schemas/selectedPaymentOptionItem"
2743+
}
2744+
},
2745+
"paymentOptionItem": {
2746+
"x-go-name": "PaymentOption",
2747+
"type": "object",
2748+
"required": [
2749+
"name"
2750+
],
2751+
"properties": {
2752+
"name": {
2753+
"type": "string",
2754+
"example": "2 Months EMI Amount",
2755+
"description": "The display name of the option."
2756+
},
2757+
"amount": {
2758+
"type": "integer",
2759+
"example": 2000,
2760+
"description": "The amount that can be paid for this option in paise."
2761+
},
2762+
"minAmount": {
2763+
"type": "integer",
2764+
"example": 200,
2765+
"description": "The minimum amount that can be paid for this option in paise."
2766+
},
2767+
"maxAmount": {
2768+
"type": "integer",
2769+
"example": 20000,
2770+
"description": "The maximum amount that can be paid for this option in paise."
2771+
},
2772+
"amountMultiple": {
2773+
"type": "integer",
2774+
"example": 100,
2775+
"description": "The payment amount should be a multiple of this value in paise."
2776+
}
26302777
}
26312778
},
26322779
"planItem": {
@@ -2794,6 +2941,25 @@
27942941
"type": "integer",
27952942
"example": 120000
27962943
},
2944+
"bills": {
2945+
"type": "array",
2946+
"example": [
2947+
{
2948+
"billNumber": "4705299027986032967",
2949+
"amount": 3000
2950+
},
2951+
{
2952+
"billNumber": "3056665275489131002",
2953+
"amount": 7000
2954+
}
2955+
],
2956+
"description": "Details of bills for which payment was made.",
2957+
"items": {
2958+
"$ref": "#/components/schemas/bill"
2959+
},
2960+
"uniqueItems": true,
2961+
"nullable": true
2962+
},
27972963
"billerId": {
27982964
"type": "string",
27992965
"description": "The biller ID on BBPS",

0 commit comments

Comments
 (0)