# Biller API enhancements
## User story - Developer
I as a developer will be able to do the following
1. Be able to see the product documentation
2. Be able to see the API documentation
4. Be able to sign up on console for bill payments.
5. Be able to see a demo for the bill payment through WhatsApp
1. Go to the dummy biller App
2. Create a dummy bill for a nominal amount like 1-2 Rupees.
3. Enter my PhoneNumber
4. Get a WhatsApp notification from Setu Whatsapp Business Account with the due amount, a "UPI Deep Link" (This contains a unique VPA and a bill URL).
5. Make a payment by clicking on the link. I should be able to use any UPI app do this.
6. Get a notification on the dummy biller app that the bill has been paid.
7. Get a WhatsApp confirmation that the bill has been paid.
6. Be able to do the following on the sandbox
1. View the documentation on the entire process of sandbox Integration.
2. Create an app
3. Create a product instance for bill payments
4. Configure the product instance to allow for bill collection through WhatsApp/SMS
5. Configure the product instance with fetchBill (optional), fetchReceipt URL & JWT credentials
6. Get the JWT credentials for making calls to Setu
7. Be able to download Postman Collections preconfigured with my credentials for creating bill and seeing reports
8. Be able to create bill through the API
- This will send a dummy payment link to WhatsApp
- I can complete a mock payment on the dummy UPI app.
- I will get confirmation that the bill has been paid after completing the dummy payment app.
10. Get the API hit to fetchReceipt API.
11. I should be able to access the reports for the mock transactions
- Should be able to see and download csv for transactions on console
- Should be able to access the reporting APIs
15. Submit the app/product instance for review
- Submit required KYC details. Details about organisation, PAN, TAN, Cancelled cheque for settlement account
- Submit agreement and pricing
17. Be able to get any support through console chat/community forums/email.
7. Be notified about the following events on email and on console notifications
1. When Setu has verified the KYC details
2. When the WhatsApp business account is enabled (Setu will automatically create and manage the Business account on behalf of me)
8. Be able to do the following after I have been approved.
1. Be able to toggle to live on console
2. Be able to see an app and product instance preconfigured
3. Be able to set the fetch URLs and JWT credentials
4. Be able to see my app credentials for accessing Setu APIs.
5. Be able to onboard my customers to my Business Whatsapp channel.
6. Be able to go live on platforms like BBPS/PhonePe (Usual collect flow)
7. Be able to do API calls to Live APIs of Setu.
8. Receive settlements on KYC completed accounts on T+1.
## User story for customer
### WhatsApp
As a customer of the developer who wants to interact using WhatsApp,
1. I will receive an SMS with details to opt in to chatting on Whatsapp with the business
2. Once I have opted in I can do the following
1. Receive bills to be paid for the business whenever a new bill is due
1. Receive message that contains a payment link, amount and name of business
2. Click on the payment link
3. On the link is open, see details about the bill
4. Be able to click on pay
5. Pay through UPI
6. Get a confirmation on WhatsApp.
## Features
1. You can create bill
2. The bill can be
- fetched by payer app. This can be used by offline biller case.
- sent to whatsapp/SMS. The message sent will have a deep link which can be used to make UPI payment.
3. Biller can chose to not have the `fetchReceipt` call made to them. This is for offline biller and they will just use the console to take the reports and reconcile.
3. If the biller is online, when the bill is paid, `fetchReceipt` API is fired. This is similar to the existing flow
### Request
```json
{
"bill": {
"billerBillID": "12123131322",
"generatedOn": "2019-08-01T08:28:12Z",
"dueDate": "2020-03-30T00:00:00Z",
"recurrence": "ONE_TIME",
"amountExactness": "EXACT",
"customerAccount": {
"id": "8208021440"
},
"aggregates": {
"total": {
"displayName": "Total Outstanding",
"amount": {
"value": 99000
}
}
}
},
"notifications": [
{
"channel": "SMS",
"address": "+919881873053"
},
{
"channel": "WhatsApp",
"address": "+919881873053"
}
],
"customerIdentifiers": [ //if present this can be used in fetch bill flow
{
"attributeName": "loanNumber",
"attributeValue": "INDIAPT4641S"
}
]
}
````
### Response
```json
{
"status": 200,
"success": true,
"data": {
"bill": {
"billerBillID": "12123131322",
"generatedOn": "2019-08-01T08:28:12Z",
"dueDate": "2020-03-30T00:00:00Z",
"recurrence": "ONE_TIME",
"amountExactness": "EXACT",
"customerAccount": {
"id": "8208021440"
},
"aggregates": {
"total": {
"displayName": "Total Outstanding",
"amount": {
"value": 99000
}
}
},
"platformBillID": "910816365173",
"platformBillStatus": "BILL_CREATED",
"paymentAddresses": [
{
"type": "UPI",
"identifier": "dmi.910816365173@kaypay"
},
{
"type": "LINK",
"identifier": "https://setu.pay/edDfO"
}
]
}
}
}
```