• Select

  • Select

In this tutorial, you use Fusion platform to set up a Shared Spends product. 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 prepaid 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. Create personal account for Abhinav

  3. Fund Abhinav’s Account

  4. Add Ishaan Shukla as Account Holder

  5. Create presonal account for Ishaan

  6. Map Ishaan’s prepaid card to pool account

Before you begin

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

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 request, an Account Holder with a unique identifier is created on Fusion. For the sake of this tutorial, we are taking the following deviations:

You can create two types of Account Holders on Fusion - Real Account Holder and Legal Account Holder . For this use-case, you create a Real Account Holder for Abhinav Shukla .

Pass application details in the body to create Account Holder for Abhinav, under 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.

To read more about Account Holders, see About Account Holders. For more information on the /newIndividual endpoint, see Core API Reference.
cURL Sample
Switch Theme
Expand More
Copy
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": [ ]
}' 
Code Copied

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.

cURL Sample
Switch Theme
Expand More
Copy
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'
Code Copied
JSON Sample
Switch Theme
Expand More
Copy
{
  "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": {}
}
Code Copied

Step 2. Create primary Account Holder’s account

On Fusion, Account/Payment products are issued to an Account Holder using Bundles. Bundle is an encapsulation of Account and Payment products that can be provisioned to your Account Holders. For example, a liability account that provides a salary account and a prepaid 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 Account and Payment products

Before issuing an Account and a Payment product using Bundle, let’s find out the available products for Abhinav, under ifiID 140827. To do this, call the /bundles endpoint. The response returns a unique identifier, id, for each available product.

To read more about Bundles, see Account Types. For more information on the /bundles endpoint, see Core API Reference
cURL Sample
Switch Theme
Expand More
Copy
curl -X GET \
  https://fusion.preprod.zeta.in/api/v1/ifi/140827/bundles \
  -H 'X-Zeta-AuthToken: {{AUTH_TOKEN}}'
Code Copied
JSON Sample
Switch Theme
Expand More
Copy
[
  {
    "id": "ee64c930-c06f-49cb-9443-84b132b9d4e2",
    "ifiID": 140827,
    "vboID": "VBO",
    "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": "VBO",
    "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": "VBO",
    "name": "VBO 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": "VBWB",
    "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": "VBO",
    "name": "VBO 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": "VBWBWP",
    "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": "VBO",
    "name": "VBOpool 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": "VBOOLB",
    "description": "Bundle to issue VBOpool account to an individual. Expected min KYC account holders without PAN information "
  },
  {
    "id": "62d1c389-b50f-4535-b879-d31890de9474",
    "ifiID": 140827,
    "vboID": "VBO",
    "name": "VBOpool 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": "VPOOLBWP",
    "description": "Bundle to issue VBOpool account to an individual. Expected min KYC account holders with PAN information "
  }
]
Code Copied

As you can see from the response JSON above, there are four products available—2 Pool accounts with and without PAN (VBOpool bundle); and 2 Personal accounts with and without PAN (VBO wallet bundle).

Issue Account and Payment products

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

Issue Personal account

To issue Personal account to Abhinav, call /bundles/{bundleID}/issueBundle endpoint and pass the identifier, id, of the Personal account without PAN, obtained from Retrieve Account and Payment products step. This creates a Personal account for Abhinav with a unique identifier, accountID. Note the value of this parameter in the response.

cURL Sample
Switch Theme
Expand More
Copy
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" : "VBOwalletbundle9adcf36",
    "phoneNumber" : "+919583170190"
}'
Code Copied
JSON Sample
Switch Theme
Expand More
Copy
{
  "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"
    }
  ]
}
Code Copied

Issue Pool account

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

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

cURL Sample
Switch Theme
Expand More
Copy
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" : "VBOpoolbundleb9988179",
    "phoneNumber" : "+919583170190"
}'
Code Copied
JSON Sample
Switch Theme
Expand More
Copy
{
  "accounts": [
    {
      "bundleID": "c9adcf36-f237-4dee-851b-b6ae06893dd2",
      "accountHolderID": "b9988179-9a74-41f5-aba4-0b85e501fd68",
      "accountID": "97417dc9-a636-4cd1-b5b8-4951103403dc"
    }
  ],
  "paymentInstruments": []
}
Code Copied

Retrieve Resource details

Resource is the logical grouping of various Payment Instruments that belong to an Account Holder. For example, cards (a type of Payment Instruments) are grouped under a Resource. When an Account Holder is issued a Product using Bundles, a Resource with a unique identifier is also generated for them. The Resource contains information regarding the various Payment Instruments (for example, card) assigned to the Account Holder. An Account Holder may have several Resources of the same or different types. Payment card, mobile number, and email id are examples of resources supported on Fusion.

When Personal account is issued to Abhinav, two resources—prepaid 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 Personal account response.

To read more about Resources, see Key Concepts. For more information on the resource endpoint, see Core API Reference
cURL Sample
Switch Theme
Expand More
Copy
curl -X GET \
  https://fusion.preprod.zeta.in/api/v1/ifi/140827/resources/d0a21d7b-38ad-4ab1-88a4-fc17c2189244 \
  -H 'X-Zeta-AuthToken: {{AUTH_TOKEN}}' \
Code Copied
JSON Sample
Switch Theme
Expand More
Copy
{
    "ifi": 140827,
    "id": "d0a21d7b-38ad-4ab1-88a4-fc17c2189244",
    "resourceProductId": "2ac114f3",
    "resourceProduct": {
        "ifi": 140827,
        "id": "2ac114f3",
        "code": "RPVBO001",
        "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_VBO_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": "[email protected]"
                }
            },
            {
                "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_VBO_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": "[email protected]"
                }
            }
        ],
        "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": {}
}
Code Copied
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 Pool 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:

To read more about Accounts, see Account APIs For more information on the /transfers endpoint, see Core API Reference
cURL Sample
Switch Theme
Expand More
Copy
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": {}
}'
Code Copied
JSON Sample
Switch Theme
Expand More
Copy
{
    "requestID": "test_fundaccount_b7988179",
    "transferID": "20200107092556637_512_test_fundaccount_b7988179",
    "status": "SUCCESS"
}
Code Copied

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 account step.

For more information on the /balance endpoint, see Core API Reference
cURL Sample
Switch Theme
Expand More
Copy
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}}'
Code Copied
JSON Sample
Switch Theme
Expand More
Copy
{
  "balance": 1000,
  "currency": "INR",
  "lastTransactionID": "20200109130436079_1108_test_fundaccount_b7956179",
  "accountingType": "LIABILITY",
  "headers": {}
}
Code Copied

Retrieve Transactions

What is a Transaction?

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 account step. To get a paginated view, use pageSize and pageNumber query parameters.

cURL Sample
Switch Theme
Expand More
Copy
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}}'
Code Copied
JSON Sample
Switch Theme
Expand More
Copy
{
    "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": "[\"[email protected]/1\"]",
                "aura.coa-id": "3071036307140878880",
                "account.pf-id": "558731570586644109",
                "bundle.name": "VBO 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": "[\"[email protected]/1\"]",
                "aura.coa-id": "3071036307140878880",
                "account.pf-id": "558731570586644109",
                "bundle.name": "VBOpool 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": {}
}
Code Copied

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:

Pass application details in the body to create Real Account Holder for Ishaan, under IFI ID 140827. Note the Account Holder identifier (individualID) in the response.

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

Important

To read more about Account Holders, see About Account Holders. For more information on the /newIndividual endpoint, see Core API Reference.

cURL Sample
Switch Theme
Expand More
Copy
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": []],   
}'
Code Copied
JSON Sample
Switch Theme
Expand More
Copy
{
    "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": {}
}
Code Copied

Step 5. Create secondary Account Holder’s account

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

Issue Personal account to secondary Account Holder

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

cURL Sample
Switch Theme
Expand More
Copy
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"
}'
Code Copied
JSON Sample
Switch Theme
Expand More
Copy
 {
    "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"
        }
    ]
}
Code Copied

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

When the Personal account is issued to Ishaan, the prepaid card is mapped to his personal account by default. To implement this use-case of Shared Spends, the prepaid 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.
cURL Sample
Switch Theme
Expand More
Copy
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"
}'
Code Copied
JSON Sample
Switch Theme
Expand More
Copy
{
    "ifi": 140827,
    "id": "cf8d9db8-cde8-4522-aaa7-026d4ff768e0",
    "resourceProductId": "2ac114f3",
    "resourceProduct": {
        "ifi": 140827,
        "id": "2ac114f3",
        "code": "RPVBO001",
        "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_VBO_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": "[email protected]"
                }
            },
            {
                "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_VBO_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": "[email protected]"
                }
            }
        ],
        "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": {}
} 
Code Copied

Notice how the value for targetURI key in the response matches the value for target key in the request. Ishaan’s prepaid cardis now mapped to the pool account.

Note

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

Make Payment

Ishaan can now use the issued prepaid 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.