- Created by Seema, last modified on Aug 12, 2020
Find out how Cipher REST APIs can be integrated into the Card Management System (CMS) or other such systems to trigger updates on Cipher System. Find out Cipher Offering here.
In this article, you will learn how to use the Cipher APIs and then build your own Two Factor Authentication (2FA).
Create Card
This endpoint allows you to enroll cards for authentication along with the cardholder’s identification information and challengeable identities. The API supports enrollment using either of the following enrollment options:
- using the 15/16-digit card PAN
- using the SHA256 of the card
Endpoint URI
POST | /tenants/{tenantId}/cards |
Request details
Request parameters
Request sample
Parameter | Description |
---|---|
Body parameters | |
String, Required | Name of the cardholder. |
String, Required | Type of schemes to enroll cards in Cipher:
|
Integer, Required | A 15/16-digit card PAN. This field is mandatory when |
String, Required | The base64 encoded SHA256 of the card PAN. |
String, Required | The masked card PAN in the 6x4 masked format with unmasked first 6 digits and last 4 digits. This is needed for the following reasons:
|
String, Required | Type of identity challenged to authenticate the cardholder. Supported types are phone number, email and tenantUniqueVector:
|
String, Optional | Value of the specified identity type. |
String, Optional | Desired state of a card.
|
{ "name" : "Amit", "cardInfo" : { "scheme" : "DEFAULT", "cardNumber" : "1112228948763895" }, "identities" : [ { "type" : "phoneNumber", "value" : "+918948763892" }, { "type" : "tenantUniqueVector", "value" : "D7480" }, { "type" : "email", "value" : "amit@zeta.tech" } ], "state" : "ENABLED" }
Response details
Response parameters
Response sample
Parameter | Description |
---|---|
String | The card reference ID generated on the Cipher system. |
String | Card Globally Unique Identifier. In Cipher, whenever a card is enrolled , at Zeta an alias is created for it called |
String | Name of the cardholder. |
Integer | ID of the tenant generated on the Cipher system. |
String | ID of the product generated on the Cipher system. |
String | Name of the product generated on the Cipher system. |
cardHolderId String | ID of the cardholder generated in the Cipher system. If more than one card is enrolled with the same value for tenantUniqueVector, the values for other identity types should match exactly. The enrollment call fails if more than one card is enrolled with the same value for tenantUniqueVector but the values for other identities differ. |
String | The
|
String | A 15/16-digit card PAN. This field is mandatory when |
String | Type of network used to manage payments. Examples: Visa and Mastercard. |
String | Desired state of a card.
|
String | Type of identity challenged to authenticate the cardholder. Supported types are phone number, email and tenantUniqueVector:
|
String | A value for a given type of identity used to authenticate the cardholder. |
String | Desired state of the identity for authentication. |
{ "cardId": "CRN0000059516", "cardGuid": "9425de25-d15c-49e8-a707-ad618df72e96", "name": "Name", "tenantId": "296793", "productId": "PRO00001", "productName": "First Product Updated", "cardHolderId": "fiWjynqJVV3pKDDCHV5HLQ==", "authProfileId": "fiWjynqJVV3pKDDCHV5HLQ==", "cardNumber": "123456xxxxxx8848", "cardNetwork": "rupay", "state": "ENABLED", "identities": [ { "type": "phoneNumber", "value": "+919876548765", "state": "ENABLED" }, { "type": "tenantUniqueVector", "value": "Drio", "state": "ENABLED" }, { "type": "email", "value": "test@zeta.tech", "state": "ENABLED", "createdAt": "2020-07-21T11:53:02.652+0000" }, { "type": "cardGuid", "value": "9425de25-d15c-49e8-a707-ad618df72e96", "state": "ENABLED" } ], "createdBy": { "actorJid": "yAUnv4Zwxtiyq-KMl4ZTOQ==@authProfile.296793.admin/29", "mode": "API" } }
Update Card
This endpoint allows you to enable or disable a card using its cardId
.
Endpoint URI
PATCH | /tenants/{tenantId}/cards/{cardId} |
Request details
Request parameters
Request sample
Parameter | Description |
---|---|
Body parameters | |
String, Required | Desired state of a card.
|
{ "state":"DISABLED" }
Response details
Response parameters
Response sample
Parameter | Description |
---|---|
String | The card reference ID generated on the Cipher system. |
String | Card Globally Unique Identifier. In Cipher, whenever a card is enrolled , at Zeta an alias is created for it called |
String | Name of the cardholder. |
Integer | ID of the tenant generated on the Cipher system. |
String | ID of the product generated on the Cipher system. |
String | Name of the product generated on the Cipher system |
String | The
|
String | A 15/16-digit card PAN. This field is mandatory when |
String | Type of network used to manage payments between card issuing banks and merchant banks. Examples: Visa and Mastercard. |
String | Type of identity challenged to authenticate the cardholder. Supported types are phone number, email and tenantUniqueVector:
|
String | A value for a given type of identity used to authenticate the cardholder. |
String | Desired state of the identity for authentication. |
{ "cardId": "CRN0000000050", "cardGuid": "5f90a3d8-8b59-441f-95cd-2e1b3fb680ee", "name": "Foo Bar", "tenantId": "900912", "productId": "PRO00103", "productName": "My Amex Product", "authProfileId": "_aP56QPq1U03wFTq_lNBqg==", "cardNumber": "111111xxxxxx172", "cardNetwork": "amex", "state": "DISABLED", "identities": [ { "type": "cardGuid", "value": "5f90a3d8-8b59-441f-95cd-2e1b3fb680ef", "state": "ENABLED" }, { "type": "tenantUniqueVector", "value": "990011223", "state": "ENABLED" }, { "type": "phoneNumber", "value": "+919999999999", "state": "ENABLED" } ] }
Get Tenant
This endpoint allows you to retrieve details of a tenant. A tenant is an organization or financial institute on-boarded with Zeta.
Endpoint URI
GET | /tenants/{tenantId} |
Request details
Request parameters
Parameter | Description |
---|---|
Query parameters | |
Integer, Required | ID of the tenant generated on the Cipher system. |
Response details
Response parameters
Response sample
Parameter | Description |
---|---|
Integer | ID of the tenant generated on the Cipher system. |
String | Name of the tenant. A tenant is an organization or financial institute on-boarded with Zeta. |
String | Configurations for look and feel of the authentication page.
|
String | Desired state of a card.
|
authPlans String | A collection of authentication plans that are available to choose from for configuring the authentication experience of the cardholder . Currently, the Cipher system supports single factor authentication plans like SMS_OTP, email_OTP, and Super PIN. |
{ "tenantId": "900912", "name": "HDFC", "config": { "gaID": "ga_id_amzn_fstv", "logoURL": "https://sample.svg", "templateConfig": { "bannerBgColor": "#ebebeb", "linkTextColor": "#7d52cd", "activeBtnColor": "#7d52cd", "bannerTextColor": "#222", "disabledBtnColor": "#cfcfcf", "primaryTextColor": "#222", "secondaryTextColor": "#030303" }, "challengeConfig": { "resendOTPLimit": 3, "incorrectChallengeAttemptLimit": 2 }, "authExpiryInSeconds": 300 }, "state": "ENABLED", "authPlans": [ { "authPlanId": 1, "factors": [ { "factorNumber": 1, "identities": [ { "identityType": "phoneNumber" } ] } ] } ] }
Get CardHolder
This endpoint allows you to fetch the enrollment details of a cardholder, including the identity types.
Endpoint URI
GET | /tenants/{tenantId}/cardHolders/{cardHolderId} |
Request details
Request parameters
Parameter | Description |
---|---|
Query parameters | |
Integer, Required | ID of the tenant generated on the Cipher system. |
String, Required | ID of the cardholder generated in the Cipher system. The If more than one card is enrolled with the same value for tenantUniqueVector, the values for other identity types should match exactly. The enrollment call fails if more than one card is enrolled with the same value for tenantUniqueVector but the values for other identities differ. |
Response details
Response parameters
Response sample
Parameter | Description |
---|---|
String | ID of the cardholder for whom the enrollment details are being fetched. If more than one card is enrolled with the same value for tenantUniqueVector, the values for other identity types should match exactly. The enrollment call fails if more than one card is enrolled with the same value for tenantUniqueVector but the values for other identities differ. |
String | Name of the tenant. A tenant is an organization or financial institute on-boarded with Zeta. |
Integer | ID of the tenant generated on the Cipher system. |
String | Type of identity challenged to authenticate the cardholder. Supported types are phone number, email and tenantUniqueVector:
|
String | A value for a given type of identity used to authenticate the cardholder. |
String | The card reference ID generated on the Cipher system. |
String | Card Globally Unique Identifier. In Cipher, whenever a card is enrolled, at Zeta an alias is created for it called |
String | ID of the product generated on the Cipher system. |
String | Name of the product generated on the Cipher system |
String | The masked card PAN in the 6x4 masked format with unmasked first 6 digits and last 4 digits. This is needed for the following reasons:
|
String | Type of network used to manage payments. Examples: Visa and Mastercard. |
String | Desired state of a card.
|
String | A reason provided when the card of the cardholder is blocked. |
String | Attributes (in key, value pair) attached to the card. |
createdBy String | This is required for auditing purposes. It consists of following two fields:
|
{ "cardHolderId": "kasdjnaskdjnalskn==", "name": "Foo Bar", "tenantId": "900912", "identities": [ { "type": "phoneNumber", "value": "+918948763892" }, { "type": "email", "value": "test@example.com" }, { "type": "tenantUniqueVector", "value": "D740" } ], "cards": [ { "cardId": "CRN0000000050", "cardGuid": "5f90a3d8-8b59-441f-95cd-2e1b3fb680ee", "productId": "PRO00103", "productName": "My Amex Product", "maskedCardNumber": "111111xxxxxx172", "cardNetwork": "amex", "state": "ENABLED", "disabledReason": "", "config": {“key”: “value”, “key1”: “value1”}, "createdBy": { "actorJid":"VcEupC_Vw0XUhTMPfvCi2A==@authProfile.160683.admin/2", "mode": "API" } } ] }
Update CardHolder Identities
This endpoint allows you to update the identities of a cardholder. Currently, the Cipher system supports identities such as phone numbers and email. You can update any one or both identities at a time. You can use the identity in a challenge verification only if it is enabled in your product.
Endpoint URI
PATCH | /tenants/{tenantId}/cardHolders/{cardHolderId}/identities |
Request details
Request parameters
Request sample
Parameter | Description |
---|---|
Query parameters | |
Integer, Required | ID of the tenant generated on the Cipher system. |
String, Required | ID of the cardholder generated in the Cipher system. The If more than one card is enrolled with the same value for tenantUniqueVector, the values for other identity types should match exactly. The enrollment call fails if more than one card is enrolled with the same value for tenantUniqueVector but the values for other identities differ. |
Body Parameters | |
String, Required | Type of identity to be updated. At least one type of identity should be specified. If both identity types are specified, this API updates both. If an identity type does not exist for this cardholder, this API will add the identity type. |
String, Required | New value of the identity. |
{ "identitiesInfo": [ { "type": "phoneNumber", "value": "+918948763892" }, { "type": "email", "value": "test@example.com" } ] }
Response details
Response parameters
Response sample
Parameter | Description |
---|---|
String | ID of the cardholder for which the identities are being updated in the Cipher system. If more than one card is enrolled with the same value for tenantUniqueVector, the values for other identity types should match exactly. The enrollment call fails if more than one card is enrolled with the same value for tenantUniqueVector but the values for other identities differ. |
String | An updated list is received with all identities of the cardholder. |
{ "cardHolderId": "kasdjnaskdjnalskn==", "identities": [ { "type": "phoneNumber", "value": "+918948763892" }, { "type": "email", "value": "test@example.com" } ] }
Error codes
This section explains the various error codes thrown by Cipher APIs.
The sample error response below shows server-side error code and message returned in case of any error:
{ "code": "ER001", "message": "Bad request", "debugId": "9551a715-79d4-4b64-a3d8-11efe7610baf" }
The following table lists the error codes, descriptions and possible solutions. If the issue persists, contact Zeta.
Error Code | Error Message | HTTP Status |
| Unexpected server error occurred | 500 |
| Bad request | 400 |
| Conflicting input | 409 |
| Resource not found | 404 |
| Unauthorized action | 401 |
- No labels