Unknown macro: {hivestonebreadcrumb}
Page tree
Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

In this tutorial, you use Fusion platform to set up a Shared Spends product for your customers. The product enables family members to use funds from a common family (referred to pool here) account, without being added to a banking system. Family members spend the funds using cards just like bank-issued debit cards - to shop online, withdraw cash at the ATM, or swipe at merchant's POS machines. This is particularly beneficial for young adults, who currently can't use digital payment instruments like digital wallets due to age restriction.  

Consider the following scenario:

Abhinav Shukla, father, wants set up a common savings account for the family. He also wants to issue a prepaid card to his son, Ishaan, for his college expenses.

As a fintech, you will be performing the following actions to implement the above use-case:

  1. Add Abhinav Shukla as Account Holder
  2. Issue Bundle to Abhinav
  3. Fund Abhinav's Account
  4. Add Ishaan Shukla as Account Holder
  5. Issue Bundle to Abhinav
  6. Map Ishaan's debit card to pool account

Before you begin

Keep the following points in mind before making calls to Fusion APIs:

  • Endpoint URI: To ensure data privacy and security, all Fusion APIs are served over HTTPS and use the common URI https://fusion.preprod.zeta.in/
  • Authentication: Before testing any endpoint using the cURL sample provided, replace {{AUTH_TOKEN}} with the X-Zeta-AuthToken provided by Zeta.
  • accountHolderID and individualID are same and used interchangeably in the tutorial. 
  • A unique identifier (ifiID140827 is assigned to the fintech for this tutorial.

All request examples in the tutorial are provided as cURL samples, and response examples are provided in JSON format.

Step 1. Create primary Account Holder

In a real-world scenario, creating an Account Holder consists of submitting an application request for the applicant with details. This involves calling multiple APIs to complete the process. After Zeta verifies and approves the requestan Account Holder with a unique identifier is created on Fusion. For the sake of this tutorial, we are taking the following deviations:

  • Call only the newIndividual endpoint. 
  • Aadhar is used for KYC verification. 
  • The request is auto-approved, as indicated by status:APPROVED in the response.

You can create three types of Account Holders on Fusion - Individual and Company. For this use-case, you create an Individual Account Holder for Abhinav Shukla

Pass application details in the body to create Account Holder for Abhinavunder ifiID 140827. Note the Account Holder identifier (individualID) in the response. We will be needing this in subsequent steps.

Important

For every new application, request Form ID, phone number and KYC must be unique.

Request

Response

cURL sample
curl -X POST \
  https://fusion.preprod.zeta.in/api/v1/ifi/140827/applications/newIndividual \
  -H 'Content-Type: application/json' \
  -H 'X-Zeta-AuthToken: {{AUTH_TOKEN}}' \
  -d '{
    "ifiID": "140827",
    "formID": "formID_745",
    "spoolID": "123",
    "individualType": "REAL",
    "salutation": "Mr.",
    "firstName": "Abhinav",
    "middleName": "",
    "lastName": "Shukla",
    "profilePicURL": "",
    "applicationType": "CREATE_ACCOUNT_HOLDER",
    "dob": {
        "year": 1992,
        "month": 7,
        "day": 5
    },
    "gender": "FEMALE",
    "mothersMaidenName": "kumari",
    "kycDetails": {
        "kycStatus": "MINIMAL",
        "kycStatusPostExpiry": "string",
        "kycAttributes": {},
        "authData": {
            "AADHAAR":123780789022
        },
        "authType": "AADHAAR"
    },
    "vectors": [
        {
            "type": "p",
            "value": "+919583170190",
            "isVerified": false
        }
    ],
    "pops": [],
    "customFields": {
        "companyID": [
            1,
            2,
            3
        ]
    },
    "tags": [
         
    ]
}'

JSON sample
{
  "applicationID": "1158",
  "formID": "formID_745",
  "ifiID": 140827,
  "spoolID": "123",
  "status": "APPROVED",
  "individualID": "b9988179-9a74-41f5-aba4-0b85e501fd68",
  "applicationType": "REAL",
  "salutation": "Mr.",
  "firstName": "Abhinav",
  "middleName": "",
  "lastName": "Shukla",
  "profilePicURL": "",
  "dob": {
    "year": 1992,
    "month": 7,
    "day": 5
  },
  "gender": "FEMALE",
  "mothersMaidenName": "kumari",
  "vectors": {
    "494c9ffe-98ac-4a17-9e69-a0112109effb": {
      "type": "aadhaar",
      "value": "OyqYXR+TvnRMnCVPIpXe+amOfwWblwORK1cK8qMr7oE=",
      "isVerified": false
    },
    "3503dfa6-d762-4ca3-8a51-2be5efff2f10": {
      "type": "p",
      "value": "+919583170190",
      "isVerified": false
    }
  },
  "pops": {},
  "tags": {},
  "kycDetails": {
    "kycStatus": "MINIMAL",
    "updateTime": "Jan 6, 2020 7:41:05 AM",
    "expiryTime": "Jan 5, 2021 7:41:05 AM",
    "kycStatusPostExpiry": "SHORTFALL_NON_CORP",
    "authType": "AADHAAR",
    "authData": {
      "AADHAAR": "OyqYXR+TvnRMnCVPIpXe+amOfwWblwORK1cK8qMr7oE="
    },
    "kycAttributes": {
      "reference": "dd4302e0-1da9-4ea2-9948-22f74c2568dcydYKXSknhzbDHcL+3sfXzQ==",
      "aadhaar": "OyqYXR+TvnRMnCVPIpXe+amOfwWblwORK1cK8qMr7oE=",
      "authType": "AADHAAR",
      "kycType": "MINIMAL"
    }
  },
  "customFields": {
    "companyID": [
      1,
      2,
      3
    ]
  },
  "createdAt": "Jan 6, 2020 7:41:05 AM",
  "updatedAt": "Jan 6, 2020 7:41:05 AM",
  "headers": {}
}

Retrieve Account Holder Details

To view Account Holder details, call the accountHolders/{accountHolderID} endpoint. To view Abhinav's details, pass the value of individualID obtained from the  Create Primary Account Holder step in the endpoint.

Request

Response

cURL sample
curl -X GET 'https://fusion.preprod.zeta.in/api/v1/ifi/140827/accountHolders/b9988179-9a74-41f5-aba4-0b85e501fd68' \
-H 'X-Zeta-AuthToken: {{AUTH_TOKEN}}'\
-H 'Content-Type: application/json'
JSON sample
{
  "requestID": "7ef0d6a4-e098-47fd-9d1c-6b9d8edc52de",
  "id": "b9988179-9a74-41f5-aba4-0b85e501fd68",
  "ifiID": 140827,
  "accountHolderProviderID": "862bb162-b5ad-4112-9d73-bb2306546a36",
  "vectors": [
    {
      "id": "b6bd9b26-16b3-4b99-b7d4-a1ecdd3718d3",
      "accountHolderID": "b9988179-9a74-41f5-aba4-0b85e501fd68",
      "ifiID": 140827,
      "status": "ENABLED",
      "type": "aadhaar",
      "value": "OyqYXR+TvnRMnCVPIpXe+amOfwWblwORK1cK8qMr7oE=",
      "createdAt": "Jan 6, 2020 7:41:05 AM",
      "headers": {}
    },
    {
      "id": "94b63932-3a7a-4bce-8334-12f85ddaeaca",
      "accountHolderID": "b9988179-9a74-41f5-aba4-0b85e501fd68",
      "ifiID": 140827,
      "status": "ENABLED",
      "type": "p",
      "value": "+919583170190",
      "createdAt": "Jan 6, 2020 7:41:05 AM",
      "headers": {}
    }
  ],
  "type": "REAL",
  "status": "ENABLED",
  "KYCStatus": {
    "ifiID": 140827,
    "accountHolderID": "b9988179-9a74-41f5-aba4-0b85e501fd68",
    "kycStatus": "MINIMAL",
    "updateTime": {
      "date": {
        "year": 2020,
        "month": 1,
        "day": 6
      },
      "time": {
        "hour": 7,
        "minute": 41,
        "second": 5,
        "nano": 579646000
      }
    },
    "expiryTime": {
      "date": {
        "year": 2021,
        "month": 1,
        "day": 5
      },
      "time": {
        "hour": 7,
        "minute": 41,
        "second": 5,
        "nano": 0
      }
    },
    "attributes": {
      "aadhaar": "OyqYXR+TvnRMnCVPIpXe+amOfwWblwORK1cK8qMr7oE=",
      "kycType": "MINIMAL",
      "authType": "AADHAAR",
      "reference": "dd4302e0-1da9-4ea2-9948-22f74c2568dcydYKXSknhzbDHcL+3sfXzQ=="
    },
    "headers": {}
  },
  "salutation": "Mr.",
  "firstName": "Abhinav",
  "middleName": "",
  "lastName": "Shukla",
  "profilePicURL": "",
  "dob": "Jul 5, 1992",
  "gender": "FEMALE",
  "mothersMaidenName": "kumari",
  "pops": [],
  "tags": [],
  "attributes": {
    "companyID": "[1.0, 2.0, 3.0]"
  },
  "createdAt": {
    "date": {
      "year": 2020,
      "month": 1,
      "day": 6
    },
    "time": {
      "hour": 7,
      "minute": 41,
      "second": 5,
      "nano": 579646000
    }
  },
  "headers": {}
}

Step 2. Issue Bundle to primary Account Holder

On Fusion, banking products are issued to a customer using Bundles. Bundle is a concept that enables creating and combining several products that could be sold together. For example, a salary account that provides a savings account and a debit card.

For Abhinav, we will be issuing two accounts to him—a personal account for Abhinav, and a pool account which Ishaan will use funds from. Both of these accounts will be provisioned using Bundles, as explained below:

Retrieve Bundles

Before issuing a Bundle, let's find out which Bundles are available for Abhinav, under ifiID 140827. To do this, call the bundles endpoint. The response returns a unique identifier, id, for each available Bundle.

Request

Response

cURL sample
curl -X GET \
  https://fusion.preprod.zeta.in/api/v1/ifi/140827/bundles \
  -H 'X-Zeta-AuthToken: {{AUTH_TOKEN}}'
JSON sample
[
  {
    "id": "ee64c930-c06f-49cb-9443-84b132b9d4e2",
    "ifiID": 140827,
    "vboID": "zeta",
    "name": "Account + Payment Product Bundle",
    "accountProducts": [
      {
        "id": "9e97fc72-d692-4c0a-bccc-ba689954d9af",
        "productID": "7706229683808022627",
        "type": "ACCOUNT",
        "programIDs": "",
        "ifiID": 140827
      }
    ],
    "paymentProducts": [
      {
        "id": "86da4629-9c59-45d9-9c0e-61d78ccb196f",
        "productID": "baefec67",
        "type": "PAYMENT",
        "programIDs": "",
        "ifiID": 140827
      }
    ],
    "status": "active",
    "createdAt": "Nov 9, 2019 10:19:49 AM",
    "updatedAt": "Nov 28, 2019 2:01:13 PM"
  },
  {
    "id": "31c30bca-7406-44e0-8d31-26bc3ed8a1ee",
    "ifiID": 140827,
    "vboID": "zeta",
    "name": "Account Product Bundle",
    "accountProducts": [
      {
        "id": "942a4cf7-3749-4919-b6cb-4a5f2d29c77c",
        "productID": "4732811754742423772",
        "type": "ACCOUNT",
        "programIDs": "",
        "ifiID": 140827
      }
    ],
    "paymentProducts": [],
    "status": "active",
    "createdAt": "Nov 12, 2019 11:36:32 AM",
    "updatedAt": "Nov 28, 2019 2:02:06 PM"
  },
  {
    "id": "39a8ee50-471d-4da7-a574-141e4770d0af",
    "ifiID": 140827,
    "vboID": "fampay",
    "name": "Fampay wallet bundle (minKYC without PAN)",
    "accountProducts": [
      {
        "id": "df287dce-9f81-4d8c-b26d-852ae01e19ad",
        "productID": "8892149590596675137",
        "type": "ACCOUNT",
        "programIDs": "",
        "ifiID": 140827
      }
    ],
    "paymentProducts": [
      {
        "id": "03ad6d81-f2d3-4d50-9197-a025ba6eac2a",
        "productID": "baefec67",
        "type": "PAYMENT",
        "programIDs": "",
        "ifiID": 140827
      }
    ],
    "status": "active",
    "createdAt": "Dec 20, 2019 1:01:28 PM",
    "updatedAt": "Dec 20, 2019 1:01:28 PM",
    "shortCode": "FPWB",
    "picURL": "https://test.com",
    "description": "Bundle to issue wallet to an individual. Expected min KYC account holders without PAN information "
  },
  {
    "id": "404dbe33-c2ee-4848-8feb-84a923a171e8",
    "ifiID": 140827,
    "vboID": "fampay",
    "name": "Fampay wallet bundle (minKYC with PAN)",
    "accountProducts": [
      {
        "id": "8bc91f1f-a499-4592-b36d-98445aedc663",
        "productID": "4705539073445243817",
        "type": "ACCOUNT",
        "programIDs": "",
        "ifiID": 140827
      }
    ],
    "paymentProducts": [
      {
        "id": "ba2ab020-ce79-4150-b0e9-856baeb44126",
        "productID": "baefec67",
        "type": "PAYMENT",
        "programIDs": "",
        "ifiID": 140827
      }
    ],
    "status": "active",
    "createdAt": "Dec 20, 2019 1:01:43 PM",
    "updatedAt": "Dec 20, 2019 1:01:43 PM",
    "shortCode": "FPWBWP",
    "picURL": "https://test.com",
    "description": "Bundle to issue wallet to an individual. Expected min KYC account holders with PAN information "
  },
  {
    "id": "c9adcf36-f237-4dee-851b-b6ae06893dd2",
    "ifiID": 140827,
    "vboID": "fampay",
    "name": "Fampool bundle (minKYC without PAN)",
    "accountProducts": [
      {
        "id": "934d19d8-031e-4291-adc2-7d4835a15c70",
        "productID": "8892149590596675137",
        "type": "ACCOUNT",
        "programIDs": "",
        "ifiID": 140827
      }
    ],
    "paymentProducts": [],
    "status": "active",
    "createdAt": "Dec 20, 2019 1:01:53 PM",
    "updatedAt": "Dec 20, 2019 1:01:53 PM",
    "shortCode": "FPOOLB",
    "description": "Bundle to issue fampool account to an individual. Expected min KYC account holders without PAN information "
  },
  {
    "id": "62d1c389-b50f-4535-b879-d31890de9474",
    "ifiID": 140827,
    "vboID": "fampay",
    "name": "Fampool bundle (minKYC with PAN)",
    "accountProducts": [
      {
        "id": "882365fe-21af-4365-bef1-4dca1fcfdf05",
        "productID": "4705539073445243817",
        "type": "ACCOUNT",
        "programIDs": "",
        "ifiID": 140827
      }
    ],
    "paymentProducts": [],
    "status": "active",
    "createdAt": "Dec 20, 2019 1:02:00 PM",
    "updatedAt": "Dec 20, 2019 1:02:00 PM",
    "shortCode": "FPOOLBWP",
    "description": "Bundle to issue fampool account to an individual. Expected min KYC account holders with PAN information "
  }
]

As you can see from the response JSON above, there are four Bundles available—2 Pool Bundles with and without PAN (Fampool bundle); and 2 Wallet Bundles with and without PAN (Fampay wallet bundle). 

Issue Bundle

While creating Account Holder for Abhinav, AADHAR was provided for KYC verification. Hence, we issue the Pool Bundle and Wallet Bundle without PAN to Abhinav.

Issue Wallet Bundle

To issue Wallet Bundle to Abhinav, call bundles/{bundleID}/issueBundle endpoint and pass the identifier, id,  of the Wallet Bundle without PAN, obtained from Retrieve Bundles step. This creates a personal account/wallet for Abhinav with a unique identifier, accountIDNote the value of this parameter in the response.  

Request

Response

cURL sample
curl -X POST \
  https://fusion.preprod.zeta.in/api/v1/ifi/140827/bundles/39a8ee50-471d-4da7-a574-141e4770d0af/issueBundle \
  -H 'Content-Type: application/json' \
  -H 'X-Zeta-AuthToken: {{AUTH_TOKEN}}'
  -d '{    
    "accountHolderID": "b9988179-9a74-41f5-aba4-0b85e501fd68",
	"name" : "Fampaywalletbundle9adcf36",
	"phoneNumber" : "+919583170190"
}'

JSON sample
{
  "accounts": [
    {
      "bundleID": "39a8ee50-471d-4da7-a574-141e4770d0af",
      "accountHolderID": "b9988179-9a74-41f5-aba4-0b85e501fd68",
      "accountID": "375e2078-fd4f-4a81-ac87-b32b2b3f4e5a"
    }
  ],
  "paymentInstruments": [
    {
      "bundleID": "39a8ee50-471d-4da7-a574-141e4770d0af",
      "resourceID": "d0a21d7b-38ad-4ab1-88a4-fc17c2189244",
      "status": "ACTIVE",
      "targetAccount": "375e2078-fd4f-4a81-ac87-b32b2b3f4e5a"
    }
  ]
}

Issue Pool Bundle

After issuing Wallet Bundle, it is time to issue Pool Bundle to Abhinav. This creates the family account which Ishaan will use to draw funds from.

Similar to issuing Wallet Bundle, call bundles/{bundleID}/issueBundle endpoint but pass the id of the Pool Bundle without PAN this time. Note the value of the accountID of the pool account created from the response.

Request

Response

cURL sample
curl -X POST \
  https://fusion.preprod.zeta.in/api/v1/ifi/140827/bundles/c9adcf36-f237-4dee-851b-b6ae06893dd2/issueBundle \
  -H 'Content-Type: application/json' \
  -H 'X-Zeta-AuthToken: {{AUTH_TOKEN}}'
  -d '{    
    "accountHolderID": "b9988179-9a74-41f5-aba4-0b85e501fd68",
	"name" : "Fampaypoolbundleb9988179",
	"phoneNumber" : "+919583170190"
}'

JSON sample
{
  "accounts": [
    {
      "bundleID": "c9adcf36-f237-4dee-851b-b6ae06893dd2",
      "accountHolderID": "b9988179-9a74-41f5-aba4-0b85e501fd68",
      "accountID": "97417dc9-a636-4cd1-b5b8-4951103403dc"
    }
  ],
  "paymentInstruments": []
}

Retrieve Resource details

A Resource is an entity representing a digitally authenticatable vector of an Account Holder. Hence, it belongs to an Account Holder and can be used for authentication in any financial or non-financial transactions. Payment card, mobile number, and email id are examples of Resources supported on Fusion.

When Wallet Bundle is issued to Abhinav, two resources—debit card and mobile number, are also assigned to him. To retrieve details of these resources, call the resources/{resourceID} endpoint and pass the resourceID returned from  Issue Wallet Bundle response.


Request

Response

cURL sample
curl -X GET \
  https://fusion.preprod.zeta.in/api/v1/ifi/140827/resources/d0a21d7b-38ad-4ab1-88a4-fc17c2189244 \
  -H 'X-Zeta-AuthToken: {{AUTH_TOKEN}}' \
JSON sample
{
    "ifi": 140827,
    "id": "d0a21d7b-38ad-4ab1-88a4-fc17c2189244",
    "resourceProductId": "2ac114f3",
    "resourceProduct": {
        "ifi": 140827,
        "id": "2ac114f3",
        "code": "RPFAM001",
        "name": "Prepaid Card Resource Product",
        "description": "Prepaid RuPay card resource product for IDFC",
        "formFactorProducts": [
            {
                "ifi": 140827,
                "id": "4f6ed594",
                "code": "CMSFF100",
                "name": "IDFC Form Factor Pr100",
                "description": "Mobile Form Factor Product for IDFC",
                "type": "phoneNumber",
                "policies": {
                    "issuancePolicies": [],
                    "paymentPolicies": []
                },
                "provider": "PMS",
                "skuID": "IDFC_FAMPAY_MS",
                "tags": [],
                "attributes": {},
                "issuanceStatus": "ACTIVE",
                "paymentStatus": "ACTIVE",
                "createdAt": "Nov 15, 2019 5:28:13 PM",
                "modifiedAt": "Nov 15, 2019 5:28:13 PM",
                "headers": {
                    "tenantID": "140827",
                    "object": "140827@tenant.zeta.in"
                }
            },
            {
                "ifi": 140827,
                "id": "66abce21",
                "code": "CMSFF001",
                "name": "IDFC Form Factor Product 001",
                "description": "Card Form Factor Product for IDFC",
                "type": "card",
                "policies": {
                    "issuancePolicies": [],
                    "paymentPolicies": []
                },
                "provider": "CMS",
                "skuID": "IDFC_FAMPAY_MS",
                "tags": [],
                "attributes": {},
                "issuanceStatus": "ACTIVE",
                "paymentStatus": "ACTIVE",
                "createdAt": "Nov 20, 2019 4:33:37 PM",
                "modifiedAt": "Nov 20, 2019 4:33:37 PM",
                "headers": {
                    "tenantID": "140827",
                    "object": "140827@tenant.zeta.in"
                }
            }
        ],
        "tags": [],
        "policies": {
            "issuancePolicies": [],
            "paymentPolicies": []
        },
        "status": "ACTIVE",
        "createdAt": "Nov 20, 2019 4:36:45 PM",
        "modifiedAt": "Nov 28, 2019 7:20:03 PM",
        "headers": {}
    },
    "targetURI": "account://375e2078-fd4f-4a81-ac87-b32b2b3f4e5a",
    "formFactors": [
        {
            "id": "13c3c5d2-6c06-4187-888c-b781b0cc24de",
            "ifi": 140827,
            "formFactorProductID": "4f6ed594",
            "formFactorID": "+919583170190",
            "targetURI": "account:375e2078-fd4f-4a81-ac87-b32b2b3f4e5a",
            "tags": [],
            "attributes": {},
            "policies": {
                "issuancePolicies": [],
                "paymentPolicies": []
            },
            "status": "ACTIVE",
            "createdAt": "Jan 6, 2020 2:09:28 PM",
            "modifiedAt": "Jan 6, 2020 2:09:28 PM",
            "headers": {}
        },
        {
            "id": "1dd05c2c-b9ed-4482-9191-83a2c8468c21",
            "ifi": 140827,
            "formFactorProductID": "66abce21",
            "formFactorID": "051ca6cf-2bfa-4a9a-9353-5c3d4aae8ba8",
            "targetURI": "account:375e2078-fd4f-4a81-ac87-b32b2b3f4e5a",
            "tags": [],
            "attributes": {},
            "policies": {
                "issuancePolicies": [],
                "paymentPolicies": []
            },
            "status": "ACTIVE",
            "createdAt": "Jan 6, 2020 2:09:29 PM",
            "modifiedAt": "Jan 6, 2020 2:09:29 PM",
            "headers": {}
        }
    ],
    "tags": [],
    "policies": {
        "issuancePolicies": [],
        "paymentPolicies": []
    },
    "attributes": {},
    "status": "ACTIVE",
    "createdAt": "Jan 6, 2020 2:09:28 PM",
    "modifiedAt": "Jan 6, 2020 2:09:28 PM",
    "headers": {}
}

PCI DSS compliance is mandatory to fetch card details using the  Cards API. If you are not PCI DSS compliant, you must integrate the Card SDK into your application.

Step 3. Fund Account

What is an Account?

Account is the entity that holds money for the Account Holder. This is the actual account that would exist at, for example, HDFC bank on MG Road.

In this step, you fund the newly created pool account of Abhinav using the transfers endpoint. Provide the values for the following keys in the request body:

  • transferCode:  Code to specify the mode of fund transfer like IMPS, NEFT and UPI.
  • debitAccountID: ID of the VBO's account from where the funds will be transferred. 
  • creditAccountID: ID of the account to which the funds will be transferred. As we are funding Abhinav's pool account, provide the  accountID returned in the  Issue Pool Bundle step.
Request

Response

cURL sample
curl -X POST \
  https://fusion.preprod.zeta.in/api/v1/ifi/140827/transfers \
  -H 'Content-Type: application/json' \
  -H 'X-Zeta-AuthToken: {{AUTH_TOKEN}}'\
  -d '{
    "requestID" : "test_fundaccount_b7988179",
    "amount": {
        "currency" : "INR",
        "amount" : 100
    },
    "transferCode": "ATLAS_P2M_AUTH",
    "debitAccountID": "ebc49dda-f664-4280-9bb7-52e62a379a26",
    "creditAccountID": "97417dc9-a636-4cd1-b5b8-4951103403dc",
    "transferTime": 12324254832342,
    "remarks": "TEST FUND ACCOUNT",
    "attributes": {}
}'
JSON sample
{
    "requestID": "test_fundaccount_b7988179",
    "transferID": "20200107092556637_512_test_fundaccount_b7988179",
    "status": "SUCCESS"
}

Retrieve Account Balance

To retrieve balance of an account, call the /accounts/{accountID}/balance endpoint. For this use-case, as the pool account is being used to transfer funds, we view the balance of this account. Pass the pool account's ID, accountID, returned as response in Issue Pool Bundle step. 

For more information on the balance endpoint, see Core API Reference.

Request

Response

cURL sample
curl -X GET \
  https://fusion.preprod.zeta.in/api/v1/ifi/140827/accounts/97417dc9-a636-4cd1-b5b8-4951103403dc/balance \
  -H 'X-Zeta-AuthToken: {{AUTH_TOKEN}}'
JSON sample
{
  "balance": 1000,
  "currency": "INR",
  "lastTransactionID": "20200109130436079_1108_test_fundaccount_b7956179",
  "accountingType": "LIABILITY",
  "headers": {}
}

Retrieve Transactions

In Fusion, a Transaction refers to any fund transfer from one account to another. This includes payment, deposit or withdrawal of funds. 

You can view transactions for Abhinav's personal as well as pool account. As pool account is being used, call /accounts/{accountID}/transactions endpoint, and pass pool account's accountID, returned as response in  Issue Pool Bundle step. To get a paginated view, use pageSize and pageNumber query parameters.

Request

Response

cURL sample
curl -X GET \
  'https://fusion.preprod.zeta.in/api/v1/ifi/140827/accounts/97417dc9-a636-4cd1-b5b8-4951103403dc/transactions?pageSize=2&pageNumber=3' \
  -H 'X-Zeta-AuthToken: {{AUTH_TOKEN}}'
JSON sample
{
    "accountTransactionList": [
        {
            "accountID": "97417dc9-a636-4cd1-b5b8-4951103403dc",
            "transactionID": "20200113130528523_2615_FUSION-140827-9c1bae42-0610-4253-96c3-62af594d1bde-1578920727914",
            "reversalTransactionIDs": [],
            "previousBalance": 711,
            "newBalance": 511,
            "timestamp": 1578920728550,
            "amount": 200,
            "currency": "INR",
            "recordType": "DEBIT",
            "remarks": "TEST123",
            "attributes": {
                "account.pd-id": "8892149590596675137",
                "zeta.card-program-id": "",
                "debitAuthSignatory": "[\"10@zetauser.zeta.in/1\"]",
                "aura.coa-id": "3071036307140878880",
                "account.pf-id": "558731570586644109",
                "bundle.name": "Fampool bundle (minKYC without PAN)",
                "policies": "{}",
                "account.account-holder-id": "b9988179-9a74-41f5-aba4-0b85e501fd68",
                "journal.voucherCode": "ATLAS_P2M_AUTH",
                "journal.self": "false",
                "zeta.card-program-ids": "",
                "aura.parent-node-id": "1159171505324535297",
                "isForced": "false",
                "payment.captured": "true",
                "account.account_holder.account_holder_provider_id": "862bb162-b5ad-4112-9d73-bb2306546a36",
                "zeta.ifi": "140827",
                "zeta.ppi-type": "OPEN",
                "zeta.product-type": "Generic",
                "zeta.ifi-product-type": "GPR_MIN_KYC_WITHOUT_PAN",
                "athena.account-provider-id": "a36ac47b-c2a2-406c-b6a0-f8857fc5f735",
                "zeta.business-id": "140827"
            },
            "headers": {}
        },
        {
            "accountID": "97417dc9-a636-4cd1-b5b8-4951103403dc",
            "transactionID": "20200113130414238_1671_FUSION-140827-9c1bae42-0610-4253-96c3-62af594d1bde-1578920654203",
            "reversalTransactionIDs": [],
            "previousBalance": 891,
            "newBalance": 711,
            "timestamp": 1578920654269,
            "amount": 180,
            "currency": "INR",
            "recordType": "DEBIT",
            "remarks": "TEST123",
            "attributes": {
                "account.pd-id": "8892149590596675137",
                "zeta.card-program-id": "",
                "debitAuthSignatory": "[\"10@zetauser.zeta.in/1\"]",
                "aura.coa-id": "3071036307140878880",
                "account.pf-id": "558731570586644109",
                "bundle.name": "Fampool bundle (minKYC without PAN)",
                "policies": "{}",
                "account.account-holder-id": "b9988179-9a74-41f5-aba4-0b85e501fd68",
                "journal.voucherCode": "ATLAS_P2M_AUTH",
                "journal.self": "false",
                "zeta.card-program-ids": "",
                "aura.parent-node-id": "1159171505324535297",
                "isForced": "false",
                "payment.captured": "true",
                "account.account_holder.account_holder_provider_id": "862bb162-b5ad-4112-9d73-bb2306546a36",
                "zeta.ifi": "140827",
                "zeta.ppi-type": "OPEN",
                "zeta.product-type": "Generic",
                "zeta.ifi-product-type": "GPR_MIN_KYC_WITHOUT_PAN",
                "athena.account-provider-id": "a36ac47b-c2a2-406c-b6a0-f8857fc5f735",
                "zeta.business-id": "140827"
            },
            "headers": {}
        }
    ],
    "totalRecord": 6,
    "headers": {}
}

Step 4. Create secondary Account Holder

In this step, we provision Account Holder for Ishaan Shukla. The steps are similar as in Abhinav's case, and therefore, we are taking the same deviations:

  • Call only the applications/newIndividual endpoint. 
  • Aadhar is used for KYC verification. 
  • The request is auto-approved, as indicated by status:APPROVED in the response.

Pass application details in the body to create Individual Account Holder for Ishaanunder IFI ID 140827. Note the Account Holder identifier (individualID) in the response.

Important

For every new application request, Form ID, phone number and KYC must be unique.

Request

Response

cURL sample
curl -X POST 'https://fusion.preprod.zeta.in/api/v1/ifi/140827/applications/newIndividual' \
-H 'Content-Type: application/json' \
-H 'X-Zeta-AuthToken: {{AUTH_TOKEN}}' \
-d '{
    "ifiID": "140827",
    "formID": "formID_9089",
    "spoolID": "123",
    "individualType": "REAL",
    "salutation": "Mr.",
    "firstName": "Ishaan",
     "customFields":{
   	"mobileNumber":"+919876576535",
   	"companyID": [
            1,
            2,
            3
        ]
   },
    "middleName": "",
    "lastName": "Shukla",
    "profilePicURL": "",
    "applicationType": "CREATE_ACCOUNT_HOLDER",
    "dob": {
        "year": 1996,
        "month": 3,
        "day": 12
    },
    "gender": "MALE",
    "mothersMaidenName": "kumari",
    "kycDetails": {
        "kycStatus": "MINIMAL",
        "kycStatusPostExpiry": "string",
        "kycAttributes": {},
        "authData": {
        	"AADHAAR": "345654312453"
        },
        "authType": "AADHAAR"
    },
    "vectors": [
        {
            "type": "p",
            "value": "+917865478765",
            "isVerified": false
        }
    ],
    "pops": [],
 
    "tags": [
        
    ],
   
  
}'
JSON sample
{
    "applicationID": "27868",
    "formID": "formID_9089",
    "ifiID": 140827,
    "spoolID": "123",
    "status": "APPROVED",
    "individualID": "fffd72e8-a1b3-46c1-a3f6-a905c31bfc46",
    "applicationType": "REAL",
    "salutation": "Mr.",
    "firstName": "Ishaan",
    "middleName": "",
    "lastName": "Shukla",
    "profilePicURL": "",
    "dob": {
        "year": 1996,
        "month": 3,
        "day": 12
    },
    "gender": "MALE",
    "mothersMaidenName": "kumari",
    "vectors": {
        "fb43899a-a3e3-4318-acb0-e8e02aa83188": {
            "type": "p",
            "value": "+917865478765",
            "isVerified": false
        }
    },
    "pops": {},
    "tags": {
        "03f4fd31-cb34-4705-adb6-6a67e6fb9c0c": {
            "type": "vbo-id",
            "value": "4fa18593-d2d9-4bf3-bea7-7f6deb9f2ca4",
            "attributes": {}
        }
    },
    "kycDetails": {
        "kycStatus": "MINIMAL",
        "updateTime": "Mar 6, 2020 10:53:41 AM",
        "expiryTime": "Feb 11, 2119 10:53:41 AM",
        "kycStatusPostExpiry": "MINIMAL",
        "authType": "AADHAAR",
        "authData": {
            "AADHAAR": "345654312453"
        },
        "kycAttributes": {
            "authType": "AADHAAR",
            "kycType": "MINIMAL"
        }
    },
    "customFields": {
        "mobileNumber": "+919876576535",
        "companyID": [
            1.0,
            2.0,
            3.0
        ]
    },
    "createdAt": "Mar 6, 2020 10:53:41 AM",
    "updatedAt": "Mar 6, 2020 10:53:42 AM",
    "source": "Fusion",
    "headers": {}
}

Step 5. Issue Bundle to secondary Account Holder

In Abhinav's case, we issued two accounts to him. As Ishaan is the secondary Account Holder, we provision only personal account/wallet to him. This will also issue two resources—a debit card and mobile number to him.  The process here, again, is the same as in the case of Abhinav. 

Issue Wallet Bundle

To issue Wallet Bundle to Ishaan, call bundles/{bundleID}/issueBundle endpoint and pass the identifier, id,  of the Wallet Bundle without PAN obtained from  Retrieve Bundles step. This creates a personal account/wallet with a unique identifier, accountID. Note the value of this parameter in the response.  

Request

Response

cURL sample
curl -X POST 'https://fusion.preprod.zeta.in/api/v1/ifi/140827/bundles/39a8ee50-471d-4da7-a574-141e4770d0af/issueBundle' \
-H 'Content-Type: application/json' \
-H 'X-Zeta-AuthToken: {{AUTH_TOKEN}}' \
-d '{
    "accountHolderID": "fffd72e8-a1b3-46c1-a3f6-a905c31bfc46",
    "name": "Bundle",
    "phoneNumber": "+919876576535"
}'

JSON sample
{
    "accounts": [
        {
            "bundleID": "39a8ee50-471d-4da7-a574-141e4770d0af",
            "accountHolderID": "fffd72e8-a1b3-46c1-a3f6-a905c31bfc46",
            "accountID": "c8a9f734-8618-4e0d-9719-7368a3d388ac"
        }
    ],
    "paymentInstruments": [
        {
            "bundleID": "39a8ee50-471d-4da7-a574-141e4770d0af",
            "resourceID": "cf8d9db8-cde8-4522-aaa7-026d4ff768e0",
            "status": "ACTIVE",
            "targetAccount": "c8a9f734-8618-4e0d-9719-7368a3d388ac"
        }
    ]
}

Step 6. Map secondary Account Holder's card to pool account

When Wallet Bundle is issued to Ishaan, the debit card is mapped to his personal account by default. To implement this use-case of Shared Spends, the debit card must be mapped to the pool account. To do this, call the resources/{resourceID}/target endpoint. Provide the values for the following keys:

For more information on the target endpoint, see Core API Reference.

Request

Response

cURL sample
curl -X PATCH 'https://fusion.preprod.zeta.in/api/v1/ifi/140827/resources/cf8d9db8-cde8-4522-aaa7-026d4ff768e0/target' \
-H 'Content-Type: application/json' \
-H 'X-Zeta-AuthToken: {{AUTH_TOKEN}}' \
-d '{
	"target" : "account://97417dc9-a636-4cd1-b5b8-4951103403dc"
}'
JSON sample
{
    "ifi": 140827,
    "id": "cf8d9db8-cde8-4522-aaa7-026d4ff768e0",
    "resourceProductId": "2ac114f3",
    "resourceProduct": {
        "ifi": 140827,
        "id": "2ac114f3",
        "code": "RPFAM001",
        "name": "Prepaid Card Resource Product",
        "description": "Prepaid RuPay card resource product for IDFC",
        "formFactorProducts": [
            {
                "ifi": 140827,
                "id": "4f6ed594",
                "code": "CMSFF100",
                "name": "IDFC Form Factor Pr100",
                "description": "Mobile Form Factor Product for IDFC",
                "type": "phoneNumber",
                "policies": {
                    "issuancePolicies": [],
                    "paymentPolicies": []
                },
                "provider": "PMS",
                "skuID": "IDFC_FAMPAY_MS",
                "tags": [],
                "attributes": {},
                "issuanceStatus": "ACTIVE",
                "paymentStatus": "ACTIVE",
                "createdAt": "Nov 15, 2019 5:28:13 PM",
                "modifiedAt": "Nov 15, 2019 5:28:13 PM",
                "headers": {
                    "tenantID": "140827",
                    "object": "140827@tenant.zeta.in"
                }
            },
            {
                "ifi": 140827,
                "id": "66abce21",
                "code": "CMSFF001",
                "name": "IDFC Form Factor Product 001",
                "description": "Card Form Factor Product for IDFC",
                "type": "card",
                "policies": {
                    "issuancePolicies": [],
                    "paymentPolicies": []
                },
                "provider": "CMS",
                "skuID": "IDFC_FAMPAY_MS",
                "tags": [],
                "attributes": {},
                "issuanceStatus": "ACTIVE",
                "paymentStatus": "ACTIVE",
                "createdAt": "Nov 20, 2019 4:33:37 PM",
                "modifiedAt": "Nov 20, 2019 4:33:37 PM",
                "headers": {
                    "tenantID": "140827",
                    "object": "140827@tenant.zeta.in"
                }
            }
        ],
        "tags": [],
        "policies": {
            "issuancePolicies": [],
            "paymentPolicies": []
        },
        "status": "ACTIVE",
        "createdAt": "Nov 20, 2019 4:36:45 PM",
        "modifiedAt": "Nov 28, 2019 7:20:03 PM",
        "headers": {}
    },
    "targetURI": "account://97417dc9-a636-4cd1-b5b8-4951103403dc",
    "formFactors": [
        {
            "id": "a44153f7-6e26-4551-b5f8-7d7ed29b7687",
            "ifi": 140827,
            "formFactorProductID": "4f6ed594",
            "formFactorID": "+919876576535",
            "targetURI": "account:c8a9f734-8618-4e0d-9719-7368a3d388ac",
            "tags": [],
            "attributes": {},
            "policies": {
                "issuancePolicies": [],
                "paymentPolicies": []
            },
            "status": "ACTIVE",
            "createdAt": "Mar 6, 2020 11:17:10 AM",
            "modifiedAt": "Mar 6, 2020 11:17:10 AM",
            "headers": {}
        },
        {
            "id": "304b762f-6680-4c66-93a5-e0c4238a6000",
            "ifi": 140827,
            "formFactorProductID": "66abce21",
            "formFactorID": "1558689d-4e83-4135-9ec5-c33ae78bc771",
            "targetURI": "account:c8a9f734-8618-4e0d-9719-7368a3d388ac",
            "tags": [],
            "attributes": {},
            "policies": {
                "issuancePolicies": [],
                "paymentPolicies": []
            },
            "status": "ACTIVE",
            "createdAt": "Mar 6, 2020 11:17:11 AM",
            "modifiedAt": "Mar 6, 2020 11:17:11 AM",
            "headers": {}
        }
    ],
    "tags": [],
    "policies": {
        "issuancePolicies": [],
        "paymentPolicies": []
    },
    "attributes": {},
    "status": "ACTIVE",
    "createdAt": "Mar 6, 2020 11:17:10 AM",
    "modifiedAt": "Mar 6, 2020 11:24:14 AM",
    "headers": {}
}

Notice how the value for targetURI key in the response matches the value for target key in the request. Ishaan's debit card is now mapped to the pool account.

Note

Just like Ishaan, Abhinav can also map his debit card to the pool account using the target endpoint.

Make Payment

Ishaan can now use the issued debit card to make digital payments (e-commerce websites) or swipe the card at merchant's POS machines. No public APIs are required to be invoked, as various Acquirer, Issuer and Fusion services communicate with each other internally to process these types of transactions. 

On this page

Need Help?

Drop a mail at fusion-support@zeta.tech or call us on 080-6690 5995.

  • No labels