Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updating the examples for financial services #18

Merged
merged 3 commits into from
Jul 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 31 additions & 7 deletions api/financial-services.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5969,6 +5969,9 @@ components:
description: Describes a form
type: object
properties:
id:
description: The form identifier.
type: string
url:
description: The URL from where the form can be fetched. The content fetched from the url must be processed as per the mime_type specified in this object. Once fetched, the rendering platform can choosed to render the form as-is as an embeddable element; or process it further to blend with the theme of the application. In case the interface is non-visual, the the render can process the form data and reproduce it as per the standard specified in the form.
type: string
Expand All @@ -5984,9 +5987,10 @@ components:
enum:
- text/html
- application/xml
submission_id:
type: string
format: uuid
resubmit:
type: boolean
multiple_sumbissions:
type: boolean
FormResponse:
description: Describes the response to a form submission
type: object
Expand All @@ -5995,8 +5999,9 @@ components:
description: Contains the status of form submission.
type: boolean
default: true
signature:
type: string
submission_id:
description: This contains a UUID generated by the BPP on successful submission of the form.
type: string
format: uuid
errors:
Expand Down Expand Up @@ -6261,7 +6266,7 @@ components:
fulfillment_state:
description: The state of fulfillment during which this term is applicable.
allOf:
- $ref: "#/components/schemas/State"
- $ref: "#/components/schemas/FulfillmentState"
refund_eligible:
description: Indicates if cancellation will result in a refund
type: boolean
Expand Down Expand Up @@ -6807,7 +6812,7 @@ components:
fulfillment_state:
description: The state of fulfillment during which this term is applicable.
allOf:
- $ref: "#/components/schemas/State"
- $ref: "#/components/schemas/FulFillmentState"
replace_within:
description: Applicable only for buyer managed returns where the buyer has to replace the item before a certain date-time, failing which they will not be eligible for replacement
allOf:
Expand All @@ -6821,7 +6826,7 @@ components:
fulfillment_state:
description: The state of fulfillment during which this term IETF''s applicable.
allOf:
- $ref: "#/components/schemas/State"
- $ref: "#/components/schemas/FulFillmentState"
return_eligible:
description: Indicates whether the item is eligible for return
type: boolean
Expand Down Expand Up @@ -7053,6 +7058,25 @@ components:
description: Contains any additional or extended inputs required to confirm an order. This is typically a Form Input. Sometimes, selection of catalog elements is not enough for the BPP to confirm an order. For example, to confirm a flight ticket, the airline requires details of the passengers along with information on baggage, identity, in addition to the class of ticket. Similarly, a logistics company may require details on the nature of shipment in order to confirm the shipping. A recruiting firm may require additional details on the applicant in order to confirm a job application. For all such purposes, the BPP can choose to send this object attached to any object in the catalog that is required to be sent while placing the order. This object can typically be sent at an item level or at the order level. The item level XInput will override the Order level XInput as it indicates a special requirement of information for that particular item. Hence the BAP must render a separate form for the Item and another form at the Order level before confirmation.
type: object
properties:
head:
description: Provides the header information for the xinput.
properties:
descriptor:
$ref: '#/components/schemas/Descriptor'
index:
type: object
properties:
min:
type: string
cur:
type: string
max:
type: string
headings:
type: array
items:
type: string
description: The heading names of the forms
form:
$ref: "#/components/schemas/Form"
form_response:
Expand Down
103 changes: 28 additions & 75 deletions examples/invoice-based-loans/cancel/on_cancel-request.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@
"descriptor": {
"images": [
{
"url": "https://www.icicibank.com/content/dam/icicibank/india/assets/images/header/logo.png"
"url": "https://www.icicibank.com/content/dam/icicibank/india/assets/images/header/logo.png",
"size_type": "sm"
}
],
"code": "ICICIBANK",
"name": "ICICI Bank",
"short_desc": "ICICI Bank Ltd",
"long_desc": "ICICI Bank Ltd, India."
Expand All @@ -38,11 +38,12 @@
{
"id": "66b7b9bad166-4a3f-ada6-ca063dc9d321",
"descriptor": {
"name": "Loan Offer : INR 2,00,000"
"code": "invoice-based-loan",
"name": "Invoice based Loan Offer: INR 2,00,000"
},
"price": {
"currency": "INR",
"value": "230000"
"value": "231800"
},
"tags": [
{
Expand Down Expand Up @@ -99,29 +100,44 @@
}
],
"quote": {
"id": "b469bb12-9f67-4898-8f39-ea7816f54289",
"price": {
"currency": "INR",
"value": "231800"
},
"breakup": [
{
"title": "Principal",
"title": "Installment 1",
"price": {
"value": "200000",
"value": "46360",
"currency": "INR"
}
},
{
"title": "Interest",
"title": "Installment 2",
"price": {
"value": "30000",
"value": "46360",
"currency": "INR"
}
},
{
"title": "Processing fee",
"title": "Installment 3",
"price": {
"value": "1800",
"value": "46360",
"currency": "INR"
}
},
{
"title": "Installment 4",
"price": {
"value": "46360",
"currency": "INR"
}
},
{
"title": "Installment 5",
"price": {
"value": "46360",
"currency": "INR"
}
}
Expand Down Expand Up @@ -153,76 +169,13 @@
}
],
"payments": [
{
"type": "ON-ORDER",
"url": "https://emandate.icicibank.in",
"params": {
"amount": "46360",
"currency": "INR"
},
"status": "NOT-PAID",
"time": {
"range": {
"start": "01-06-2023 00:00:00",
"end": "30-06-2023 23:59:59"
}
}
},
{
"url": "https://emandate.icicibank.in",
"params": {
"amount": "46360",
"currency": "INR"
},
"status": "NOT-PAID",
"time": {
"range": {
"start": "01-07-2023 00:00:00",
"end": "31-07-2023 23:59:59"
}
}
},
{
"url": "https://emandate.icicibank.in",
"params": {
"amount": "46360",
"currency": "INR"
},
"status": "NOT-PAID",
"time": {
"range": {
"start": "01-08-2023 00:00:00",
"end": "31-08-2023 23:59:59"
}
}
},
{
"url": "https://emandate.icicibank.in",
"params": {
"amount": "46360",
"amount": "185440",
"currency": "INR"
},
"status": "NOT-PAID",
"time": {
"range": {
"start": "01-09-2023 00:00:00",
"end": "30-09-2023 23:59:59"
}
}
},
{
"url": "https://emandate.icicibank.in",
"params": {
"amount": "46360",
"currency": "INR"
},
"status": "NOT-PAID",
"time": {
"range": {
"start": "01-10-2023 00:00:00",
"end": "31-10-2023 23:59:59"
}
}
"status": "4 installments pending"
}
],
"cancellation_terms": [
Expand Down
16 changes: 7 additions & 9 deletions examples/invoice-based-loans/confirm/confirm-request.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,13 @@
},
"items": [
{
"id": "66b7b9bad166-4a3f-ada6-ca063dc9d321"
"id": "66b7b9bad166-4a3f-ada6-ca063dc9d321",
"xinput": {
"form_response": {
"status": true,
"submission_id": "c844d5f4-29c3-4398-b594-8b4716ef5dbf"
}
}
}
],
"fulfillments": [
Expand All @@ -38,14 +44,6 @@
}
]
}
],
"payments": [
{
"params": {
"source_bank_code": "SBIN0001234",
"source_bank_account_number": "1800002341"
}
}
]
}
}
Expand Down
16 changes: 7 additions & 9 deletions examples/invoice-based-loans/confirm/on_confirm-request.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@
"descriptor": {
"images": [
{
"url": "https://www.icicibank.com/content/dam/icicibank/india/assets/images/header/logo.png"
"url": "https://www.icicibank.com/content/dam/icicibank/india/assets/images/header/logo.png",
"size_type": "sm"
}
],
"code": "ICICIBANK",
"name": "ICICI Bank",
"short_desc": "ICICI Bank Ltd",
"long_desc": "ICICI Bank Ltd, India."
Expand All @@ -38,11 +38,12 @@
{
"id": "66b7b9bad166-4a3f-ada6-ca063dc9d321",
"descriptor": {
"name": "Loan Offer : INR 2,00,000"
"code": "invoice-based-loan",
"name": "Invoice based Loan Offer: INR 2,00,000"
},
"price": {
"currency": "INR",
"value": "230000"
"value": "231800"
},
"tags": [
{
Expand Down Expand Up @@ -99,6 +100,7 @@
}
],
"quote": {
"id": "b469bb12-9f67-4898-8f39-ea7816f54289",
"price": {
"currency": "INR",
"value": "231800"
Expand Down Expand Up @@ -169,7 +171,6 @@
}
},
{
"url": "https://emandate.icicibank.in",
"params": {
"amount": "46360",
"currency": "INR"
Expand All @@ -183,7 +184,6 @@
}
},
{
"url": "https://emandate.icicibank.in",
"params": {
"amount": "46360",
"currency": "INR"
Expand All @@ -197,7 +197,6 @@
}
},
{
"url": "https://emandate.icicibank.in",
"params": {
"amount": "46360",
"currency": "INR"
Expand All @@ -211,7 +210,6 @@
}
},
{
"url": "https://emandate.icicibank.in",
"params": {
"amount": "46360",
"currency": "INR"
Expand Down Expand Up @@ -257,4 +255,4 @@
]
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<!DOCTYPE html>
<html lang="en">

<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>

<body>
<form>
<label for="accNo">Bank Account Number</label>
<input type="text" id="accNo" name="accNo" />
<label for="ifscCode">Bank IFSC Code</label>
<input type="text" id="ifscCode" name="ifscCode" />
</form>
</body>

</html>
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<!DOCTYPE html>
<html lang="en">

<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>

<body>
<form>
<label for="aa_id">Account Aggregator ID</label>
<input type="text" id="aa_id" name="aa_id" />
<label for="requestAmount">Requested Loan Amount</label>
<input type="text" id="requestAmount" name="requestAmount" />
<label for="tnc">I have read the <a href="https://icicibank.co.in/loans/tnc.html">Terms and Conditions</a></label>
<input type="checkbox" id="tnc" name="tnc" />
</form>
</body>

</html>
Loading