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 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:
- Add Abhinav Shukla as Account HolderIssue Bundle to Abhinav
- Create personal account for Abhinav
- Fund Abhinav's Account
- Add Ishaan Shukla as Account Holder
- Issue Bundle to AbhinavCreate presonal account for Ishaan
- Map Ishaan's debit prepaid 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 (
ifiID
) 140827
is assigned to the fintech for this tutorial.
Info |
---|
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:
- 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 two types of Account Holders on Fusion - Individual and Company Real Account Holder and Legal Account Holder . For this use-case, you create an Individual 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.
Info |
---|
|
For every new application, request Form ID, phone number and KYC must be unique. |
Div |
---|
|
Div |
---|
| Div |
---|
| Code Block |
---|
language | js |
---|
theme | Midnight |
---|
title | cURL sample |
---|
collapse | true |
---|
| 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": [
]
}'
|
|
Div |
---|
| Code Block |
---|
language | js |
---|
theme | Midnight |
---|
title | JSON sample |
---|
collapse | true |
---|
| {
"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.
Div |
---|
|
Div |
---|
| Div |
---|
| Code Block |
---|
language | js |
---|
theme | Midnight |
---|
title | cURL sample |
---|
collapse | true |
---|
| 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' |
|
Div |
---|
| Code Block |
---|
language | js |
---|
theme | Midnight |
---|
title | JSON sample |
---|
collapse | true |
---|
| {
"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 Create primary Account Holder's account
On Fusion, banking Account/Payment products are are issued to a customer using an Account Holder using Bundles. Bundle is a concept that enables creating and combining several products that could be sold together is an encapsulation of Account and Payment products that can be provisioned to your Account Holders. For example, a salary liability account that provides a savings salary account and a debit 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
BundlesAccount and Payment products
Before issuing an Account and a Payment product using Bundle, let's find out which Bundles are 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 Bundleproduct.
Div |
---|
|
Div |
---|
| Div |
---|
| Code Block |
---|
language | js |
---|
theme | Midnight |
---|
title | cURL sample |
---|
collapse | true |
---|
| curl -X GET \
https://fusion.preprod.zeta.in/api/v1/ifi/140827/bundles \
-H 'X-Zeta-AuthToken: {{AUTH_TOKEN}}' |
|
Div |
---|
| Code Block |
---|
language | js |
---|
theme | Midnight |
---|
title | JSON sample |
---|
collapse | true |
---|
| [
{
"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 products available—2 Pool Bundles accounts with and without PAN (Fampool bundle
); and 2 Wallet Bundles Personal accounts with and without PAN (Fampay wallet bundle
).
Issue
BundleAccount and Payment products
While creating Account Holder for Abhinav, AADHAR was provided for KYC verification. Hence, we issue the Pool Bundle account and Wallet Bundle without Personal account without PAN to Abhinav.
Issue
Wallet BundlePersonal account
To issue Wallet Bundle to Personal account to Abhinav, call /bundles/{bundleID}/issueBundle
endpoint and pass the identifier, id
, of the Wallet Bundle without Personal account without PAN, obtained from Retrieve BundlesAccount and Payment products step. This creates a personal account/wallet Personal account for Abhinav with a unique identifier, accountID
. Note the value of this parameter in the response.
Div |
---|
|
Div |
---|
| Div |
---|
| Code Block |
---|
language | js |
---|
theme | Midnight |
---|
title | cURL sample |
---|
collapse | true |
---|
| 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"
}'
|
|
Div |
---|
| Code Block |
---|
language | js |
---|
theme | Midnight |
---|
title | JSON sample |
---|
collapse | true |
---|
| {
"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 BundlePool account
After issuing Wallet BundlePersonal account, it is time to issue Pool Bundle to account to Abhinav. This creates the family account which Ishaan will use to draw funds from.
Similar to issuing Wallet BundlePersonal account, call /bundles/{bundleID}/issueBundle
endpoint but pass the id
of the Pool Bundle account without PAN this time. Note the value of the accountID
of the pool Pool account created from the response.
Div |
---|
|
Div |
---|
| Div |
---|
| Code Block |
---|
language | js |
---|
theme | Midnight |
---|
title | cURL sample |
---|
collapse | true |
---|
| 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"
}'
|
|
Div |
---|
| Code Block |
---|
language | js |
---|
theme | Midnight |
---|
title | JSON sample |
---|
collapse | true |
---|
| {
"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 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 Wallet Bundle Personal account is issued to Abhinav, two resources—debit card 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 Wallet BundlePersonal account response.
Div |
---|
|
Div |
---|
| Div |
---|
| Code Block |
---|
language | js |
---|
theme | Midnight |
---|
title | cURL sample |
---|
collapse | true |
---|
| curl -X GET \
https://fusion.preprod.zeta.in/api/v1/ifi/140827/resources/d0a21d7b-38ad-4ab1-88a4-fc17c2189244 \
-H 'X-Zeta-AuthToken: {{AUTH_TOKEN}}' \ |
|
Div |
---|
| Code Block |
---|
language | js |
---|
theme | Midnight |
---|
title | JSON sample |
---|
collapse | true |
---|
| {
"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": {}
}
|
|
|
|
Info |
---|
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
Note |
---|
icon | false |
---|
title | 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 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 VBOFintech'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 Bundleaccount step.
Div |
---|
|
Div |
---|
| Div |
---|
| Code Block |
---|
language | js |
---|
theme | Midnight |
---|
title | cURL sample |
---|
collapse | true |
---|
| 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": {}
}' |
|
Div |
---|
| Code Block |
---|
language | js |
---|
theme | Midnight |
---|
title | JSON sample |
---|
collapse | true |
---|
| {
"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 Bundleaccount step.
Div |
---|
|
Div |
---|
| Div |
---|
| Code Block |
---|
language | js |
---|
theme | Midnight |
---|
title | cURL sample |
---|
collapse | true |
---|
| 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}}' |
|
Div |
---|
| Code Block |
---|
language | js |
---|
theme | Midnight |
---|
title | JSON sample |
---|
collapse | true |
---|
| {
"balance": 1000,
"currency": "INR",
"lastTransactionID": "20200109130436079_1108_test_fundaccount_b7956179",
"accountingType": "LIABILITY",
"headers": {}
} |
|
|
|
Retrieve Transactions
Info |
---|
title | What is a Transaction? |
---|
|
In Fusion, a |
Transaction refers to 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 Bundleaccount step. To get a paginated view, use pageSize
and pageNumber
query parameters.
Div |
---|
|
Div |
---|
| Div |
---|
| Code Block |
---|
language | js |
---|
theme | Midnight |
---|
title | cURL sample |
---|
collapse | true |
---|
| 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}}' |
|
Div |
---|
| Code Block |
---|
language | js |
---|
theme | Midnight |
---|
title | JSON sample |
---|
collapse | true |
---|
| {
"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 Real Account Holder for Ishaan for Ishaan, under IFI ID 140827
. Note the Account Holder identifier (individualID
) in the response.
Info |
---|
|
For every new application request, Form ID, phone number and KYC must be unique. |
Div |
---|
|
Div |
---|
| Div |
---|
| Code Block |
---|
language | js |
---|
theme | Midnight |
---|
title | cURL sample |
---|
collapse | true |
---|
| 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": [
],
}' |
|
Div |
---|
| Code Block |
---|
language | js |
---|
theme | Midnight |
---|
title | JSON sample |
---|
collapse | true |
---|
| {
"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 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 Personal account /wallet to him. This will also issue two resources—a debit prepaid card and mobile number to him. The process here, again, is the same as in the case of Abhinav.
Issue
Wallet BundlePersonal account
To issue Wallet Bundle Personal account to Ishaan, call /bundles/{bundleID}/issueBundle
endpoint and pass the identifier, id
, of the Wallet Bundle Personal account without PAN obtained from Retrieve BundlesAccount and Payment products step. This creates a personal account/wallet Personal account with a unique identifier, accountID
. Note the value of this parameter in the response.
Div |
---|
|
Div |
---|
| Div |
---|
| Code Block |
---|
language | js |
---|
theme | Midnight |
---|
title | cURL sample |
---|
collapse | true |
---|
| 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"
}'
|
|
Div |
---|
| Code Block |
---|
language | js |
---|
theme | Midnight |
---|
title | JSON sample |
---|
collapse | true |
---|
| {
"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 the Personal account is issued to Ishaan, the debit prepaid card is mapped to his personal account by default. To implement this use-case of Shared Spends, the debit 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:
Div |
---|
|
Div |
---|
| Div |
---|
| Code Block |
---|
language | js |
---|
theme | Midnight |
---|
title | cURL sample |
---|
collapse | true |
---|
| 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"
}' |
|
Div |
---|
| Code Block |
---|
language | js |
---|
theme | Midnight |
---|
title | JSON sample |
---|
collapse | true |
---|
| {
"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 prepaid card is now mapped to the pool account.
Info |
---|
|
Just like Ishaan, Abhinav can also map his debit prepaid card to the pool account using the /target endpoint. |
Make Payment
Ishaan can now use the issued debit 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.