{
"swagger": "2.0",
"host": "localhost:9095",
"basePath": "/",
"tags": [
{
"name": "transaction-controller-v-2",
"description": "Transaction Controller V 2"
},
{
"name": "ivr-balance-controller",
"description": "IVR Balance Controller"
},
{
"name": "zeta-transaction-controller",
"description": "Zeta Transaction Controller"
},
{
"name": "zeta-transaction-controller-v-2",
"description": "Zeta Transaction Controller V 2"
},
{
"name": "Rest APIs for Source management",
"description": "changing tag description"
},
{
"name": "transaction-controller",
"description": "Transaction Controller"
},
{
"name": "token-controller",
"description": "Token Controller"
},
{
"name": "zeta-source-controller",
"description": "Zeta Source Controller"
},
{
"name": "ivr-transaction-controller",
"description": "IVR Transaction Controller"
}
],
"paths": {
"/v1.0/zeta/transactions": {
"post": {
"tags": [
"zeta-transaction-controller"
],
"operationId": "createUsingPOST_1",
"produces": [
"*/*"
],
"parameters": [
{
"in": "body",
"name": "request",
"description": "request",
"required": true,
"schema": {
"$ref": "#/definitions/TransactionCreateRequest"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/TransactionCreateResponse"
}
},
"201": {
"description": "Created"
},
"401": {
"description": "Unauthorized"
},
"403": {
"description": "Forbidden"
},
"404": {
"description": "Not Found"
}
}
}
},
"/v1.0/zeta/transactions/createWithSourceInfo": {
"post": {
"tags": [
"zeta-transaction-controller"
],
"summary": "API to create transaction with SourceInfo",
"operationId": "createWithSourceInfoUsingPOST_1",
"consumes": [
"application/json"
],
"produces": [
"application/json",
"*/*"
],
"parameters": [
{
"in": "body",
"name": "request",
"description": "request",
"required": true,
"schema": {
"$ref": "#/definitions/TransactionCreateWithSourceInfoRequest"
}
},
{
"name": "apiKey",
"in": "header",
"description": "apiKey to access Bifrost APIs",
"required": true,
"type": "string"
}
],
"responses": {
"200": {
"description": "Successfully returned transaction details",
"schema": {
"$ref": "#/definitions/TransactionDetailsResponse"
}
},
"201": {
"description": "Created"
},
"401": {
"description": "Unauthorized"
},
"403": {
"description": "Forbidden"
},
"404": {
"description": "Not Found"
}
}
}
},
"/v1.0/zeta/transactions/{transactionUid}/cancel": {
"post": {
"tags": [
"zeta-transaction-controller"
],
"summary": "cancel",
"operationId": "cancelUsingPOST_1",
"consumes": [
"application/json"
],
"produces": [
"*/*"
],
"parameters": [
{
"name": "transactionUid",
"in": "path",
"description": "transactionUid",
"required": true,
"type": "string"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/TransactionCancelResponse"
}
},
"201": {
"description": "Created"
},
"401": {
"description": "Unauthorized"
},
"403": {
"description": "Forbidden"
},
"404": {
"description": "Not Found"
}
}
}
},
"/v1.0/zeta/transactions/request_id/{requestId}": {
"get": {
"tags": [
"zeta-transaction-controller"
],
"summary": "getTransactionDetailsByRequestIdZetaV1",
"operationId": "getTransactionDetailsByRequestIdZetaV1UsingGET",
"consumes": [
"application/json"
],
"produces": [
"*/*"
],
"parameters": [
{
"name": "requestId",
"in": "path",
"description": "requestId",
"required": true,
"type": "string"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/TransactionDetailsResponse"
}
},
"401": {
"description": "Unauthorized"
},
"403": {
"description": "Forbidden"
},
"404": {
"description": "Not Found"
}
}
}
},
"/v1.0/zeta/transactions/refund": {
"post": {
"tags": [
"zeta-transaction-controller"
],
"summary": "refundTransaction",
"operationId": "refundTransactionUsingPOST_1",
"consumes": [
"application/json"
],
"produces": [
"*/*"
],
"parameters": [
{
"in": "body",
"name": "request",
"description": "request",
"required": true,
"schema": {
"$ref": "#/definitions/RefundTransactionRequest"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/TransactionRefundResponse"
}
},
"201": {
"description": "Created"
},
"401": {
"description": "Unauthorized"
},
"403": {
"description": "Forbidden"
},
"404": {
"description": "Not Found"
}
}
}
},
"/v1.0/zeta/sources/{sourceId}": {
"get": {
"tags": [
"zeta-source-controller"
],
"summary": "getSource",
"operationId": "getSourceUsingGET_1",
"consumes": [
"application/json"
],
"produces": [
"*/*"
],
"parameters": [
{
"name": "sourceId",
"in": "path",
"description": "sourceId",
"required": true,
"type": "string"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/GetSourceResponse"
}
},
"401": {
"description": "Unauthorized"
},
"403": {
"description": "Forbidden"
},
"404": {
"description": "Not Found"
}
}
}
},
"/v1.0/zeta/transactions/chargeWithAuth": {
"post": {
"tags": [
"zeta-transaction-controller"
],
"summary": "chargeWithAuth",
"operationId": "chargeWithAuthUsingPOST",
"consumes": [
"application/json"
],
"produces": [
"*/*"
],
"parameters": [
{
"in": "body",
"name": "request",
"description": "request",
"required": true,
"schema": {
"$ref": "#/definitions/ChargeWithAuthRequest"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/TransactionDetailsResponse"
}
},
"201": {
"description": "Created"
},
"401": {
"description": "Unauthorized"
},
"403": {
"description": "Forbidden"
},
"404": {
"description": "Not Found"
}
}
}
},
"/v1.0/zeta/sources/hasBalance": {
"post": {
"tags": [
"zeta-source-controller"
],
"summary": "hasBalance",
"operationId": "hasBalanceUsingPOST",
"consumes": [
"application/json"
],
"produces": [
"*/*"
],
"parameters": [
{
"in": "body",
"name": "hasBalanceRequest",
"description": "hasBalanceRequest",
"required": true,
"schema": {
"$ref": "#/definitions/HasBalanceRequest"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/HasBalanceResponse"
}
},
"201": {
"description": "Created"
},
"401": {
"description": "Unauthorized"
},
"403": {
"description": "Forbidden"
},
"404": {
"description": "Not Found"
}
}
}
},
"/v1.0/zeta/sources/save": {
"post": {
"tags": [
"zeta-source-controller"
],
"summary": "save",
"operationId": "saveUsingPOST_1",
"consumes": [
"application/json"
],
"produces": [
"*/*"
],
"parameters": [
{
"in": "body",
"name": "saveSourceRequest",
"description": "saveSourceRequest",
"required": true,
"schema": {
"$ref": "#/definitions/SaveSourceRequest"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/SaveCardResponse"
}
},
"201": {
"description": "Created"
},
"401": {
"description": "Unauthorized"
},
"403": {
"description": "Forbidden"
},
"404": {
"description": "Not Found"
}
}
}
},
},
"definitions": {
"AccountBalance": {
"type": "object",
"required": [
"account",
"balance",
"currency",
"ifi",
"productType"
],
"properties": {
"account": {
"type": "string",
"example": "121928192891829",
"description": "Account Number"
},
"balance": {
"type": "string",
"example": "200.00",
"description": "Amount must be in Rupees"
},
"currency": {
"type": "string",
"example": "INR",
"description": "Currency",
"enum": [
"INR"
]
},
"ifi": {
"type": "string",
"example": "16382",
"description": "Details of source card"
},
"productType": {
"type": "string",
"example": "MEALPASS",
"description": "Product Type"
}
}
},
"Amount": {
"type": "object",
"required": [
"currency",
"value"
],
"properties": {
"currency": {
"type": "string",
"example": "INR",
"description": "currency type",
"enum": [
"INR"
]
},
"value": {
"type": "string",
"example": "204.00",
"description": "amount in Rupees"
}
}
},
"AmountByPurpose": {
"type": "object",
"required": [
"amount",
"purpose"
],
"properties": {
"amount": {
"description": "Possible values supported for currencies "INR" for now. Value is in Rupees",
"$ref": "#/definitions/Amount"
},
"purpose": {
"type": "string",
"example": "FOOD, FUEL",
"description": "Each purpose should have amount (in the base currency of transaction)",
"enum": [
"FOOD"
]
}
}
},
"AppToAppUserAuthorization": {
"type": "object",
"properties": {
"authorisationId": {
"type": "string"
},
"certificate": {
"$ref": "#/definitions/PublicKeyCertificate"
},
"headers": {
"$ref": "#/definitions/Headers"
},
"hmac": {
"type": "string"
},
"issuedAt": {
"type": "integer",
"format": "int64"
},
"request": {
"$ref": "#/definitions/MerchantAppRequest"
},
"validUntil": {
"type": "integer",
"format": "int64"
},
"version": {
"type": "string"
},
"zetaUA": {
"type": "string"
}
}
},
"AuthorizationData": {
"type": "object",
"properties": {
"authorisationId": {
"type": "string"
},
"headers": {
"$ref": "#/definitions/Headers"
},
"hmac": {
"type": "string"
},
"issuedAt": {
"type": "integer",
"format": "int64"
},
"request": {
"$ref": "#/definitions/Request"
},
"sourceId": {
"type": "string"
},
"validUntil": {
"type": "integer",
"format": "int64"
},
"zetaAppVersion": {
"type": "string"
},
"zetaUA": {
"type": "string"
}
}
},
"AuthorizeRequest": {
"type": "object",
"properties": {
"amount": {
"$ref": "#/definitions/Amount"
},
"cardDetails": {
"$ref": "#/definitions/CardDetails"
},
"merchantInfo": {
"$ref": "#/definitions/MerchantInfo"
},
"purposes": {
"type": "array",
"items": {
"$ref": "#/definitions/AmountByPurpose"
}
},
"requestId": {
"type": "string"
}
}
},
"BalanceForCardRequest": {
"type": "object",
"properties": {
"cardDetails": {
"$ref": "#/definitions/CardDetails"
}
}
},
"BalanceResponse": {
"type": "object",
"properties": {
"accountBalances": {
"type": "array",
"items": {
"$ref": "#/definitions/AccountBalance"
}
}
}
},
"CaptureInfo": {
"type": "object",
"properties": {
"captureTimeoutInMillis": {
"type": "integer",
"format": "int64"
},
"shouldAutoCapture": {
"type": "boolean"
}
}
},
"CaptureTransactionRequest": {
"type": "object",
"properties": {
"captureRequestId": {
"type": "string"
},
"purchaseTransactionId": {
"type": "string"
}
}
},
"CardDetails": {
"type": "object",
"properties": {
"pan": {
"type": "string"
},
"pinBlock": {
"type": "string"
}
}
},
"CardSourceDetails": {
"type": "object",
"required": [
"cardIssuer",
"maskedPan",
"ownerName"
],
"properties": {
"cardIssuer": {
"type": "string",
"example": "ZETA",
"description": "Issuer of card"
},
"maskedPan": {
"type": "string",
"example": "CARD, WALLET [Phone, Email]",
"description": "Attribute specific to source with type 'CARD'. Represents masked Pan Hash for the card"
},
"ownerName": {
"type": "string",
"example": "Mrinal Trivedi",
"description": "Name of owner of card"
}
}
},
"ChargeWithAuthRequest": {
"type": "object",
"properties": {
"sourceId": {
"type": "string"
},
"amount": {
"$ref": "#/definitions/Amount"
},
"purposes": {
"type": "array",
"items": {
"$ref": "#/definitions/AmountByPurpose"
}
},
"merchantInfo": {
"$ref": "#/definitions/MerchantInfo"
},
"authorisation": {
"$ref": "#/definitions/AppToAppUserAuthorization"
},
"attributes": {
"type": "object"
}
}
},
"ChargeWithAuthV2Request": {
"type": "object",
"properties": {
"requestId": {
"type": "string"
},
"merchantInfo": {
"$ref": "#/definitions/MerchantInfo"
},
"captureInfo": {
"$ref": "#/definitions/CaptureInfo"
},
"authorizationType": {
"type": "string",
"enum": [
"ZETA_APP_STATIC_QR",
"PREAUTHORIZED_AUTH"
]
},
"authorization": {
"$ref": "#/definitions/AuthorizationData"
}
}
},
"GenerateTokenRequest": {
"type": "object",
"required": [
"amount",
"failureUrl",
"requestId",
"sourceId"
],
"properties": {
"amount": {
"description": "amount details for the token",
"$ref": "#/definitions/Amount"
},
"failureUrl": {
"type": "string",
"example": "http://sample_domain/failure.html",
"description": "the redirection URL for failure cases"
},
"requestId": {
"type": "string",
"example": "UniqueTokenRequestId00001",
"description": "ID for this token generation request. Must be unique across all"
},
"sourceId": {
"type": "string",
"example": "src_04b8f47e-7323-4d0e-bb8d-4db9518afe10",
"description": "ID of the saved source against which the token is to be generated"
}
}
},
"GenerateTokenResponse": {
"type": "object",
"required": [
"redirectUserTo",
"requestId",
"tokenId"
],
"properties": {
"redirectUserTo": {
"type": "string",
"example": "https://bifrost.stage.zeta.in/z-sodexo/token/initiate?q=token_98364766-63f5-4a11-8d6a-2aea41b8026a",
"description": "redirection URL the customer is to be redirected to. This opens a Zeta rendered page for customer to enter further required details"
},
"requestId": {
"type": "string",
"example": "UniqueTokenRequestId00001",
"description": "echo back of the RequestID passed in the request"
},
"tokenId": {
"type": "string",
"example": "token_98364766-63f5-4a11-8d6a-2aea41b8026a",
"description": "Unique token ID for the generated token"
}
}
},
"GetCardSourceResponse": {
"type": "object",
"required": [
"accountBalances",
"cardSourceDetails",
"sourceId",
"sourceType"
],
"properties": {
"accountBalances": {
"type": "array",
"description": "Balance for various accounts that user has with Zeta.",
"items": {
"$ref": "#/definitions/AccountBalance"
}
},
"cardSourceDetails": {
"description": "Details of source card",
"$ref": "#/definitions/CardSourceDetails"
},
"sourceId": {
"type": "string",
"example": "src_iwuehy89yhlfkjfd",
"description": "Source ID for which details are fetched"
},
"sourceType": {
"type": "string",
"example": "CARD, WALLET [Phone, Email]",
"description": "Type of source",
"enum": [
"ZETA_WALLET",
"CARD",
"PHONE_NUMBER"
]
}
}
},
"GetSourceResponse": {
"type": "object",
"properties": {
"accountBalances": {
"type": "array",
"items": {
"$ref": "#/definitions/AccountBalance"
}
},
"sourceId": {
"type": "string"
},
"sourceInfo": {
"$ref": "#/definitions/SourceInfo"
}
}
},
"HasBalanceRequest": {
"type": "object",
"properties": {
"amount": {
"$ref": "#/definitions/Amount"
},
"merchantInfo": {
"$ref": "#/definitions/MerchantInfo"
},
"purposes": {
"type": "array",
"items": {
"$ref": "#/definitions/AmountByPurpose"
}
},
"sourceId": {
"type": "string"
}
}
},
"HasBalanceResponse": {
"type": "object",
"properties": {
"hasBalance": {
"type": "boolean"
},
"sourceId": {
"type": "string"
},
"sourceInfo": {
"type": "object"
}
}
},
"Headers": {
"type": "object",
"properties": {
"signature": {
"type": "string"
},
"signatoryJID": {
"type": "string"
}
}
},
"JID": {
"type": "object",
"properties": {
"appDomain": {
"type": "string"
},
"nodeId": {
"type": "string"
},
"resource": {
"type": "string"
},
"serviceName": {
"type": "string"
}
}
},
"MapOfstringAndstring": {
"type": "object",
"additionalProperties": {
"type": "string"
}
},
"MerchantAppRequest": {
"type": "object",
"properties": {
"amount": {
"$ref": "#/definitions/Amount"
},
"description": {
"type": "string"
},
"merchantUA": {
"type": "string"
},
"purposes": {
"type": "array",
"items": {
"$ref": "#/definitions/AmountByPurpose"
}
},
"requestId": {
"type": "string"
},
"version": {
"type": "string"
}
}
},
"MerchantInfo": {
"type": "object",
"required": [
"aid",
"mid",
"tid"
],
"properties": {
"aid": {
"type": "string",
"example": "sodexo",
"description": "acquirer ID given by Sodexo"
},
"mid": {
"type": "string",
"example": "usdfhaki879yh",
"description": "merchant ID given by Sodexo"
},
"tid": {
"type": "string",
"example": "56273158bj",
"description": "terminal ID given by Sodexo"
}
}
},
"PayeeInfo": {
"type": "object",
"properties": {
"location": {
"type": "string"
},
"name": {
"type": "string"
},
"type": {
"type": "string"
}
}
},
"PublicKeyCertificate": {
"type": "object",
"properties": {
"base64EncodedPublicKey": {
"type": "string"
},
"certID": {
"type": "string"
},
"certificateAttributes": {
"type": "object",
"additionalProperties": {
"type": "string"
}
},
"issuedOn": {
"type": "integer",
"format": "int64"
},
"issuerJID": {
"$ref": "#/definitions/JID"
},
"purposeWithAttributes": {
"type": "object",
"additionalProperties": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
"revoked": {
"type": "boolean"
},
"subjectJID": {
"$ref": "#/definitions/JID"
},
"type": {
"type": "string",
"enum": [
"PUBLIC_KEY",
"PRIVILEGE",
"INFO"
]
},
"validTill": {
"type": "integer",
"format": "int64"
}
}
},
"RefundStatusDetail": {
"type": "object",
"required": [
"amount",
"purposes",
"refundState",
"refundTransactionId",
"requestId",
"requestTime"
],
"properties": {
"amount": {
"description": "The amount associated with a particular refund.",
"$ref": "#/definitions/Amount"
},
"purposes": {
"type": "array",
"example": "FOOD, FUEL",
"description": "Each purpose should have amount (in the base currency of transaction)",
"items": {
"$ref": "#/definitions/AmountByPurpose"
}
},
"refundState": {
"type": "string",
"example": "REFUND_COMPLETED",
"description": "State of the refund"
},
"refundTransactionId": {
"type": "string",
"example": "txn_6e5d9703-53fa-4cde-b631-30c0ab81af97",
"description": "Refund transaction ID of a refund transaction"
},
"requestId": {
"type": "string",
"example": "requestIdStageV2Refund10002",
"description": "Purchase transaction request ID"
},
"requestTime": {
"type": "integer",
"format": "int64",
"example": 1513788236585,
"description": "Time at which the refund request was made."
}
}
},
"RefundStatusResponse": {
"type": "object",
"properties": {
"refundStatusDetails": {
"type": "object",
"additionalProperties": {
"$ref": "#/definitions/RefundStatusDetail"
}
}
}
},
"RefundTransactionRequest": {
"type": "object",
"required": [
"amount",
"purposes",
"requestId",
"transactionId"
],
"properties": {
"amount": {
"description": "Total or partial amount to be refunded",
"$ref": "#/definitions/Amount"
},
"purposes": {
"type": "array",
"description": "Each purpose should have amount (in the base currency of transaction)",
"items": {
"$ref": "#/definitions/AmountByPurpose"
}
},
"requestId": {
"type": "string",
"example": "requestIdStage10000026",
"description": "Refund transaction request ID. This is unique across transactions. Characters allowed: a-z, A-Z, 0-9. Max size allowed: 60 characters"
},
"transactionId": {
"type": "string",
"example": "txn_69a2f3a5-0afb-46a3-86d2-1ec62881e067",
"description": "Transaction ID returned by Zeta for purchase transaction"
}
}
},
"Request": {
"type": "object",
"properties": {
"amount": {
"$ref": "#/definitions/Amount"
},
"description": {
"type": "string"
},
"purposes": {
"type": "array",
"items": {
"$ref": "#/definitions/AmountByPurpose"
}
},
"requestId": {
"type": "string"
}
}
},
"ResendSmsOTPInternalRequest": {
"type": "object",
"properties": {
"q": {
"type": "string"
},
"r": {
"type": "string"
}
}
},
"SaveCardRequest": {
"type": "object",
"required": [
"failureUrl",
"requestId",
"successUrl"
],
"properties": {
"failureUrl": {
"type": "string",
"example": "http://merchant-site/cardsavefailed.php",
"description": "Requester's URL where Zeta will redirect on failure of authentication"
},
"requestId": {
"type": "string",
"example": "req_spar_vbdjkahffoasdh874627wqufid",
"description": "Transaction Request ID is generated by the requester. Should be globally unique. Zeta will reject a duplicate transaction id"
},
"successUrl": {
"type": "string",
"example": "http://merchant-site/cardsavesuccess.php",
"description": "Requester's URL where Zeta will redirect on successful authentication"
}
}
},
"SaveCardResponse": {
"type": "object",
"required": [
"redirectUserTo",
"requestId"
],
"properties": {
"redirectUserTo": {
"type": "string",
"example": "https://ecom.zetaapps.in/v1.0/sodexo/transactions/initiate?q=8o32hjsfad930uklfsajdfo",
"description": "URL where requester should redirect the user to complete the card save flow. After authorization Zeta redirects back to requester's success/failure Url."
},
"requestId": {
"type": "string",
"example": "req_spar_vbdjkahffoasdh8746",
"description": "Transaction Request ID is generated by the requester. Should be globally unique. Zeta will reject a duplicate transaction id"
}
}
},
"SaveSourceRequest": {
"type": "object",
"properties": {
"failureUrl": {
"type": "string"
},
"permissions": {
"type": "array",
"items": {
"type": "string",
"enum": [
"SAVE_FOR_FUTURE",
"GET_BALANCE",
"AUTO_DEBIT"
]
}
},
"requestId": {
"type": "string"
},
"sourceInfo": {
"$ref": "#/definitions/SourceInfo"
},
"successUrl": {
"type": "string"
}
}
},
"SourceInfo": {
"type": "object",
"required": [
"cardNumber",
"cvv",
"expiryMonth",
"expiryYear",
"ownerName",
"phoneNumber",
"sourceType"
],
"properties": {
"cardNumber": {
"type": "string",
"example": "365798263679",
"description": "The sixteen digit card number"
},
"cvv": {
"type": "string",
"example": "368",
"description": "the three digit CVV2"
},
"expiryMonth": {
"type": "string",
"example": "09",
"description": "in MM format."
},
"expiryYear": {
"type": "string",
"example": "26",
"description": "in YY format."
},
"ownerName": {
"type": "string",
"example": "Arjun Kumar",
"description": "Name of card owner"
},
"phoneNumber": {
"type": "string",
"example": "912345678",
"description": "Phone number of owner"
},
"sourceType": {
"type": "string",
"example": "CARD",
"description": "This will be static value 'CARD'",
"enum": [
"ZETA_WALLET",
"CARD",
"PHONE_NUMBER"
]
}
}
},
"TokenDetailsResponse": {
"type": "object",
"properties": {
"amount": {
"$ref": "#/definitions/Amount"
},
"createdAt": {
"type": "integer",
"format": "int64"
},
"failureReason": {
"type": "string"
},
"pinAttempts": {
"type": "integer",
"format": "int32"
},
"requestId": {
"type": "string"
},
"sourceId": {
"type": "string"
},
"tokenId": {
"type": "string"
},
"tokenStatus": {
"type": "string",
"enum": [
"CHARGED",
"CHARGE_FAILED",
"CHARGEABLE",
"CANCELLED",
"TIMEDOUT",
"UNCHARGEABLE"
]
},
"transactionId": {
"type": "string"
}
}
},
"TokenStatusResponse": {
"type": "object",
"properties": {
"status": {
"type": "string",
"enum": [
"CHARGED",
"CHARGE_FAILED",
"CHARGEABLE",
"CANCELLED",
"TIMEDOUT",
"UNCHARGEABLE"
]
}
}
},
"TransactionCancelResponse": {
"type": "object",
"required": [
"cancellationStatus",
"reason",
"transactionId"
],
"properties": {
"cancellationStatus": {
"type": "string",
"example": "SUCCESS, FAILED",
"description": "Status of transaction cancellation",
"enum": [
"SUCCESS",
"FAILED"
]
},
"reason": {
"type": "string",
"example": "null",
"description": "Reason in case of cancellation failure"
},
"transactionId": {
"type": "string",
"example": "txn_hfsadh98iadsofi",
"description": "requestID for this create transaction request. Must be unique across all"
}
}
},
"TransactionCreateRequest": {
"type": "object",
"required": [
"amount",
"failureUrl",
"merchantInfo",
"purposes",
"requestId",
"successUrl"
],
"properties": {
"amount": {
"description": "Possible values supported for currencies "INR" for now. Value is in Rupees",
"$ref": "#/definitions/Amount"
},
"failureUrl": {
"type": "string",
"example": "http://merchant-site/failed.php",
"description": "Requester's URL where Zeta will redirect on failed transaction authorization"
},
"merchantInfo": {
"description": "Information of the merchant for which payment is requested",
"$ref": "#/definitions/MerchantInfo"
},
"purposes": {
"type": "array",
"description": "Each purpose should have amount (in the base currency of transaction)",
"items": {
"$ref": "#/definitions/AmountByPurpose"
}
},
"requestId": {
"type": "string",
"example": "req_spar_vbdjkahffoasdh874627wqufid",
"description": "requestID for this create transaction request. Must be unique across all"
},
"sourceId": {
"type": "string",
"example": "src_wqe47hxfjksor89y4",
"description": "Source ID can be passed when transaction is created with a saved source and can be saved by merchant for allowing the customer to choose from saved sources to complete a transaction."
},
"successUrl": {
"type": "string",
"example": "http://merchant-site/success.php",
"description": "Requester's URL where Zeta will redirect on successful transaction authorization"
},
"attributes": {
"type": "object"
}
}
},
"TransactionCreateResponse": {
"type": "object",
"required": [
"amount",
"purposes",
"redirectUserTo",
"requestId",
"transactionId",
"transactionState"
],
"properties": {
"amount": {
"description": "Possible values supported for currencies "INR" for now. Value is in Rupees",
"$ref": "#/definitions/Amount"
},
"purposes": {
"type": "array",
"example": "sdasaf",
"description": "URL where requester should redirect the user to complete authorization of transaction",
"items": {
"$ref": "#/definitions/AmountByPurpose"
}
},
"redirectUserTo": {
"type": "string",
"example": "https://ecom.zetaapps.in/v1.0/sodexo/transactions/initiate?q=8o32hjsfad930uklfsajdfo",
"description": "URL where requester should redirect the user to complete authorization of transaction. After authorization Zeta redirects back to requester's success/failure Url."
},
"requestId": {
"type": "string",
"example": "req_spar_vbdjkahffoasdh8746",
"description": "requestID for this create transaction request. Must be unique across all"
},
"transactionId": {
"type": "string",
"example": "txn_hfsadh98iadsofi",
"description": "transactionId for this response. Will be unique across all. It is generated by Zeta"
},
"transactionState": {
"type": "string",
"example": "WAITING_FOR_CONSENT or WAITING_FOR_SOURCE",
"description": "Current state of the transaction",
"enum": [
"CREATED",
"WAITING_FOR_SOURCE",
"WAITING_FOR_CONSENT",
"CANCELLED",
"CANCELLED_BY_USER_AGENT",
"WAITING_FOR_AUTHORIZATION",
"PIN_FAILED",
"PIN_BLOCKED",
"MAX_INCORRECT_ATTEMPTS",
"UNAUTHORIZED",
"FAILED",
"WAITING_FOR_CAPTURE",
"AUTHORIZED",
"PARTIAL_REVERSAL_INITIATED",
"PARTIALLY_REVERSED",
"REVERSAL_INITIATED",
"REVERSAL_ATTEMPTED",
"REVERSAL_FAILED",
"REVERSED",
"REVERSAL_DROPPED",
"PARTIAL_REFUND_INITIATED",
"REFUND_INITIATED",
"PARTIAL_REFUND_VIA_CLEARANCE_INITIATED",
"REFUND_VIA_CLEARANCE_INITIATED",
"CLEARED_AND_PARTIAL_REFUND_INITIATED",
"CLEARED_AND_REFUND_INITIATED",
"REFUND_COMPLETED_VIA_CLEARANCE",
"PARTIAL_REFUND_COMPLETED_VIA_CLEARANCE",
"CLEARED_AND_PARTIAL_REFUND_COMPLETED",
"CLEARED_AND_REFUND_COMPLETED",
"VOID_INITIATED",
"VOID_VIA_CLEARANCE_INITIATED",
"VOID_ATTEMPTED",
"VOID_FAILED",
"VOID_COMPLETED_VIA_CLEARANCE",
"VOID_COMPLETED",
"CLEARANCE_INITIATED",
"CLEARED"
]
}
}
},
"TransactionCreateWithSourceInfoRequest": {
"type": "object",
"required": [
"amount",
"failureUrl",
"merchantInfo",
"permissions",
"purposes",
"requestId",
"sourceInfo",
"successUrl"
],
"properties": {
"amount": {
"description": "Possible values supported for currencies INR for now. Value is in Rupees",
"$ref": "#/definitions/Amount"
},
"failureUrl": {
"type": "string",
"example": "http://merchant-site/failed.php",
"description": "Requester's URL where Zeta will redirect on failed transaction authorization"
},
"merchantInfo": {
"description": "Information of the merchant (payee) for which payment is requested",
"$ref": "#/definitions/MerchantInfo"
},
"permissions": {
"type": "array",
"example": "SAVE_FOR_FUTURE, GET_BALANCE",
"description": "Requester needs to get consent for these permissions from the user on their domain and pass in this request",
"items": {
"type": "string",
"enum": [
"SAVE_FOR_FUTURE",
"GET_BALANCE",
"AUTO_DEBIT"
]
}
},
"purposes": {
"type": "array",
"description": "Each purpose should have amount (in the base currency of transaction)",
"items": {
"$ref": "#/definitions/AmountByPurpose"
}
},
"requestId": {
"type": "string",
"example": "req_spar_vbdjkahffoasdh874627wqufid",
"description": "It is generated by the requester. Should be globally unique. Zeta will reject a duplicate transaction ID"
},
"sourceInfo": {
"description": "Details of the source",
"$ref": "#/definitions/SourceInfo"
},
"successUrl": {
"type": "string",
"example": "http://merchant-site/success.php",
"description": "Requester's URL where Zeta will redirect on successful transaction authorization"
}
}
},
"TransactionDetailsResponse": {
"type": "object",
"required": [
"amount",
"failureReason",
"purposes",
"requestId",
"requestTime",
"retrievalReferenceNumber",
"sourceId",
"transactionId",
"transactionReceipt",
"transactionState"
],
"properties": {
"amount": {
"description": "Possible values supported for currencies is "INR" for now. Value is in Rupees",
"$ref": "#/definitions/Amount"
},
"failureReason": {
"type": "string",
"example": "null",
"description": "Reason for failure of transaction"
},
"purposes": {
"type": "array",
"description": "Each purpose should have amount (in the base currency of transaction",
"items": {
"$ref": "#/definitions/AmountByPurpose"
}
},
"requestId": {
"type": "string",
"example": "Jiotest109",
"description": "This is generated by the requester and is globally unique. Zeta will reject a duplicate transaction ID."
},
"requestTime": {
"type": "integer",
"format": "int64",
"example": 1512646668576,
"description": "transactionId for this response. Will be unique across all. It is generated by Zeta"
},
"retrievalReferenceNumber": {
"type": "string",
"example": "000000001599",
"description": "The retrievalReferenceNumber (RR Number) for the transaction. Its always a 12-digit number"
},
"sourceId": {
"type": "string",
"example": "src_6576f5db-a199-46b6-80cf-98dbbe96021e",
"description": "Source ID can be passed optionally when token is created with a saved source. If the sourceId is passed, then Zeta doesn't prompt the user to enter card details and directly allows user to enter the authentication page"
},
"transactionId": {
"type": "string",
"example": "txn_09246d1e-be29-4a15-8bfc-a2e5aa4b953e",
"description": "Transaction ID generated by Zeta. It is unique across all"
},
"transactionReceipt": {
"description": "Transaction receipt object with receiptID, payerInfo, payeeInfo and other details",
"$ref": "#/definitions/TransactionReceipt"
},
"transactionState": {
"type": "string",
"example": "WAITING_FOR_SOURCE, WAITING_FOR_CONSENT, CANCELLED, CANCELLED_BY_USER_AGENT, \n\nWAITING_FOR_AUTHORIZATION, AUTHORIZED, CLEARANCE_INITIATED, CLEARED,\n\nUNAUTHORIZED,\n\nREFUND_INITIATED, REFUND_FAILED, REFUND_COMPLETED, REFUND_DROPPED",
"description": "State of the transaction"
}
}
},
"TransactionDetailsResponseV2": {
"type": "object",
"properties": {
"amount": {
"$ref": "#/definitions/Amount"
},
"captureRequestId": {
"type": "string"
},
"failureCode": {
"type": "string",
"enum": [
"INSUFFICIENT_BALANCE",
"AUTHORIZATION_FAILURE",
"OTHER"
]
},
"failureReason": {
"type": "string"
},
"merchantInfo": {
"type": "object",
"additionalProperties": {
"type": "string"
}
},
"purchaseRequestId": {
"type": "string"
},
"purchaseTransactionId": {
"type": "string"
},
"purposes": {
"type": "array",
"items": {
"$ref": "#/definitions/AmountByPurpose"
}
},
"requestTime": {
"type": "integer",
"format": "int64"
},
"retrievalReferenceNumber": {
"type": "string"
},
"sourceId": {
"type": "string"
},
"transactionReceipt": {
"$ref": "#/definitions/TransactionReceipt"
},
"transactionState": {
"type": "string"
}
}
},
"TransactionReceipt": {
"type": "object",
"properties": {
"authorisationTime": {
"type": "integer",
"format": "int64"
},
"authorisedAmount": {
"type": "object"
},
"credits": {
"type": "array",
"items": {
"type": "object"
}
},
"debits": {
"type": "array",
"items": {
"type": "object"
}
},
"payeeInfo": {
"$ref": "#/definitions/PayeeInfo"
},
"payerInfo": {
"type": "object"
},
"receiptID": {
"type": "integer",
"format": "int64"
}
}
},
"TransactionRefundResponse": {
"type": "object",
"required": [
"purchaseTransactionId",
"refundTransactionId",
"requestId"
],
"properties": {
"purchaseTransactionId": {
"type": "string",
"example": "txn_28802c2f-2943-4bfc-bb87-a70dfbd936de",
"description": "Purchase transaction ID of the requested refund. This parameter is mandatory to get the refund status."
},
"refundTransactionId": {
"type": "string",
"example": "txn_f2a7802c-ef84-43c3-8615-5f706b995c23",
"description": "Refund transaction ID of a requested refund."
},
"requestId": {
"type": "string",
"example": "requestIdStage10000026",
"description": "Request ID echoed back from the request payload itself."
}
}
},
"TransactionViaCodeRequest": {
"type": "object",
"properties": {
"tokenCode": {
"type": "string"
},
"requestId": {
"type": "string"
},
"amount": {
"$ref": "#/definitions/Amount"
},
"merchantInfo": {
"$ref": "#/definitions/MerchantInfo"
},
"purposes": {
"type": "array",
"items": {
"$ref": "#/definitions/AmountByPurpose"
}
},
"failureUrl": {
"type": "string"
},
"successUrl": {
"type": "string"
}
}
},
"TransactionViaCodeResponse": {
"type": "object",
"properties": {
"requestId": {
"type": "string"
},
"requestTime": {
"type": "integer",
"format": "int64"
},
"sourceId": {
"type": "string"
},
"tokenGenerationRequestId": {
"type": "string"
},
"transactionId": {
"type": "string"
},
"transactionReceipt": {
"type": "object"
},
"transactionState": {
"type": "string",
"enum": [
"CREATED",
"WAITING_FOR_SOURCE",
"WAITING_FOR_CONSENT",
"CANCELLED",
"CANCELLED_BY_USER_AGENT",
"WAITING_FOR_AUTHORIZATION",
"PIN_FAILED",
"PIN_BLOCKED",
"MAX_INCORRECT_ATTEMPTS",
"UNAUTHORIZED",
"FAILED",
"WAITING_FOR_CAPTURE",
"AUTHORIZED",
"PARTIAL_REVERSAL_INITIATED",
"PARTIALLY_REVERSED",
"REVERSAL_INITIATED",
"REVERSAL_ATTEMPTED",
"REVERSAL_FAILED",
"REVERSED",
"REVERSAL_DROPPED",
"PARTIAL_REFUND_INITIATED",
"REFUND_INITIATED",
"PARTIAL_REFUND_VIA_CLEARANCE_INITIATED",
"REFUND_VIA_CLEARANCE_INITIATED",
"CLEARED_AND_PARTIAL_REFUND_INITIATED",
"CLEARED_AND_REFUND_INITIATED",
"REFUND_COMPLETED_VIA_CLEARANCE",
"PARTIAL_REFUND_COMPLETED_VIA_CLEARANCE",
"CLEARED_AND_PARTIAL_REFUND_COMPLETED",
"CLEARED_AND_REFUND_COMPLETED",
"VOID_INITIATED",
"VOID_VIA_CLEARANCE_INITIATED",
"VOID_ATTEMPTED",
"VOID_FAILED",
"VOID_COMPLETED_VIA_CLEARANCE",
"VOID_COMPLETED",
"CLEARANCE_INITIATED",
"CLEARED"
]
}
}
},
"UnsaveSourceRequest": {
"type": "object",
"required": [
"sourceId"
],
"properties": {
"sourceId": {
"type": "string",
"example": "src_wqe47hxfjksor89y4",
"description": "Source ID of the saved card against which the token is to be generated"
}
}
},
"UnsaveSourceResponse": {
"type": "object",
"required": [
"sourceId",
"status"
],
"properties": {
"sourceId": {
"type": "string",
"example": "src_wqe47hxfjksor89y4",
"description": "Source ID of the saved card against which the token is to be generated"
},
"status": {
"type": "string",
"example": "SUCCESS or FAILURE",
"description": "Status of card removal",
"enum": [
"SUCCESS",
"FAILED"
]
}
}
}
}
} |