Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.


Div
classmethod-area


Div
classmethod-copy


Div
classdynamic-toc


Div
classoverview

Introduction

API reference guide contains technical reference information for the  RESTful APIs with accordance with E-com payment flow, App2App and Auto-Debit payment flows. You can make use of below APIs during a payment scenario. This section explains about all RESTful operations including their request and response parameters.

Note

Payment exceptions occur when an API operation fails to process a request payload. See Error Codes to know more about exception response codes.

Button Hyperlink
titleRequest for Developer Access
typestandard
classgray-button
urlhttps://docs.google.com/forms/d/e/1FAIpQLSeZPc4Povr-2CPJH99vTa0TG3_aoiAqzwiwmCaboVhx1UOpJw/viewform
targettrue

Create a Transaction

Div
classapi-panel-expand


Div
classpost-api


Expand
titleCreate a Transaction

This operation enables you to create a transaction.

Button Hyperlink
titleRun using Zeta API Console
typestandard
classapi-button api-post
url#api-1

Functional Behaviour

Status
colourGreen
titlePost
/v1.0/zeta/transactions

Input Details

Div
classcustomtabs


Div
classtabsmenu


Div
classtabsmenu_1

Input Parameters


Div
classtabsmenu_2

Request Header


Div
classtabsmenu_3

Request Sample



Div
classtabscontent


Div
classtabpage_1


ParameterDescription
apiKeyShared by Zeta with requester during the on-boarding process.
Content-Type (mandatory)application/json
requestIdTransaction Request ID generated by the requester. It is globally unique. Zeta will reject a duplicate transaction ID.
sourceId (optional data)

Passed when transaction is created with a saved source.
Source: A representation of customers' instrument (card, phone number) using which they pay to the merchant. It provides convenience for a customer so as not to type in the card, phone, etc. details every time while completing a transaction. If the customer chooses to get the source details saved (along with a set of permissions like getBalance during a transaction, then the Get Transaction Details API response returns the sourceId.

sourceId: Can be saved by merchant for allowing the customer to choose from saved sources to complete a transaction.

amountPossible values supported for currencies INR for now.
Value is in Rupees.
merchantInfo

Information of the merchant (payee) for which payment is requested.
aid: acquirer ID given by Zeta.

mid: merchant ID given by Zeta.

tid: terminal ID given by Zeta.

purposesEach purpose should have amount (in the base currency of transaction).
Possible purpose are “FOOD”, “FUEL”.
failureUrlRequester’s URL where Zeta will redirect on failed transaction authorization.
successUrlRequester’s URL where Zeta will redirect on successful transaction authorization.



Div
classtabpage_2


Code Block
languagegroovy
themeConfluence
titleRequest Header
{
 "apiKey" : "w9e75yifheq09tyehqriofhy0q349htorehtlGJKHu095338kehqo"
 "Content-Type" : "application/json"
}



Div
classtabpage_3


Code Block
languagegroovy
themeConfluence
titleRequest Body
{
      "requestId": "req_spar_vbdjkahffoasdh874627wqufid",
      "sourceId": "src_wqe47hxfjksor89y4",
      "amount": {
      "currency": "INR",
      "value": "20.00"
      },
      "merchantInfo": {
        "aid": "sodexo",
      	"mid": "usdfhaki879yh",
      	"tid": "56273158bj",
      },
      "purposes": [
		{
				"purpose": "FOOD",
        		"amount": {
      				"currency": "INR",
      				"value": "20.00"
    			}
		}             
      ],
      "failureUrl": "http://merchant-site/failed.php",
      "successUrl": "http://merchant-site/success.php"
}




Output Details

Div
classcustomtabs


Div
classtabsmenu


Div
classtabsmenu_1

Output Parameters


Div
classtabsmenu_2

Response Sample



Div
classtabscontent


Div
classtabpage_1


ParametersDescription
redirectUserToURL where requester redirects user to complete authorization of transaction.
The redirection returns an HTML page which collects the user’s vector (phoneNo, CardDetails) along with authentication details (PIN, password, OTP). In cases where sourceId is already passed while creating a transaction, user’s vectors are not collected and only authentication details are collected.
After authorization Zeta redirects back to requester’s success/failure URL.
requestIdSame as in request payload.
transactionIdTransaction ID generated by Zeta.
transactionState'WAITING_FOR_CONSENT' OR 'WAITING_FOR_SOURCE'.



Div
classtabpage_2


Code Block
languagegroovy
themeConfluence
titleResponse Sample
{
   "transactionId": "txn_hfsadh98iadsofi",
   "requestId": "req_spar_vbdjkahffoasdh8746",
   "amount": {
       "currency": "INR",
       "value": "20.00"
   },
   "transactionState": "WAITING_FOR_CONSENT",
   "sourceId": "src_iwuehy89yhlfkjfd",
   "redirectUserTo": "https://ecom.zetaapps.in/v1.0/zeta/transactions/initiate?q=8o3769houfsdo9"
}




Info
titleError Codes

Possible error codes are - ER000, ER007, ER011, ER012, ER013, ER014, ER015, ER016, ER017, ER019, ER024.

For more details refer to Error Codes section below.







Div
classdynamic-toc

Create Transaction with SourceInfo

Div
classapi-panel-expand


Div
classpost-api


Expand
titleCreate Transaction with SourceInfo

This operation enables you to create a transaction using source details like phone number or card details. This enables a requester to collect the source details on their own domain and later get the authorization done on Zeta’s ACS page.

Button Hyperlink
titleRun using Zeta API Console
typestandard
classapi-button api-post
url#api-2

Functional Behaviour

Status
colourGreen
titlePost
/v1.0/zeta/transactions/createWithSourceInfo

Input Details

Div
classcustomtabs


Div
classtabsmenu


Div
classtabsmenu_1

Input Parameters


Div
classtabsmenu_2

Request Header


Div
classtabsmenu_3

Request Sample



Div
classtabscontent


Div
classtabpage_1


ParameterDescription
apiKeyShared by Zeta with requester during the onboarding process.
Content-Type (mandatory)application/json
requestIdTransaction Request ID generated by the requester. It is globally unique. Zeta will reject a duplicate transaction ID.
sourceInfoSource used for a transaction can be of various types (CARD, PHONE_NUMBER). Currently, the only allowed source type for this mode of transaction is PHONE_NUMBER.
amountPossible values supported for currencies INR for now.
Value is in Rupees.
merchantInfo

Information of the merchant (payee) for which payment is requested.
aid: acquirer ID given by Zeta.

mid: merchant ID given by Zeta.

tid: terminal ID given by Zeta.

purposesEach purpose should have amount (in the base currency of transaction).
Possible purposes are “FOOD”, “FUEL”.
failureUrlRequester’s URL where Zeta will redirect on failed transaction authorization.
successUrlRequester’s URL where Zeta will redirect on successful transaction authorization.
permissions

Requester needs to take consent for these permissions from the user on their domain and pass in this request.

SAVE_FOR_FUTURE: With this permission, a sourceId is returned when Get Transaction Details APIs are called.

GET_BALANCE: With this permission, balance (accountBalances) is returned in GetSource API.



Div
classtabpage_2


Code Block
languagegroovy
themeConfluence
titleRequest Header
{
 "apiKey" : "w9e75yifheq09tyehqriofhy0q349htorehtlGJKHu095338kehqo"
 "Content-Type" : "application/json"
}



Div
classtabpage_3


Code Block
languagegroovy
themeConfluence
titleRequest Body
{
  "merchantInfo": {
    "mid": "137953",
    "tid": "1_1",
    "aid": "zeta_1"
   },
   "sourceInfo": {
     "sourceType": "PHONE_NUMBER",
     "phoneNumber": "+918xxxxxxxx5"
   }, 
  "amount": {
     "currency": "INR",
     "value": "0.01"
  },   
  "purposes": [
    {
      "amount": {
        "currency": "INR",
        "value": "0.01"
      },
      "purpose": "FOOD"
    }
  ],
  "requestId": "test_2_76433395_145",
  "permissions": [
    "SAVE_FOR_FUTURE",
    "GET_BALANCE"
  ],
  "failureUrl": "http://merchant-site/failed.php",
  "successUrl": "http://merchant-site/success.php"
}




Output Details

Div
classcustomtabs


Div
classtabsmenu


Div
classtabsmenu_1

Output Parameters


Div
classtabsmenu_2

Response Sample



Div
classtabscontent


Div
classtabpage_1


ParametersDescription
requestId
Same as in request payload.
amount
Same as in request payload.
transactionState
'WAITING_FOR_CONSENT' OR 'WAITING_FOR_SOURCE'.
redirectUserTo
URL where requester redirects user to complete authorization of transaction. The redirection returns an HTML page which collects the user’s vector (phoneNo, CardDetails) along with authentication details (PIN, password, OTP). In cases where sourceId is already passed while creating a transaction, user’s vectors are not collected and only authentication details are collected. After authorization Zeta redirects back to requester’s success/failure URL.



Div
classtabpage_2


Code Block
languagegroovy
themeConfluence
titleResponse Sample
{
   "transactionId": "txn_hfsadh98iadsofi",
   "requestId": "req_spar_vbdjkahffoasdh8746",
   "amount": {
       "currency": "INR",
       "value": "20.00"
   },
   "transactionState": "WAITING_FOR_CONSENT",
   "redirectUserTo":   "https://ecom.zetaapps.in/v1.0/zeta/transactions/initiate?q=8o32hjsfad93"
}





Info
titleError Codes
Possible error codes are - ER000, ER007, ER011, ER012, ER013, ER014, ER015, ER016, ER017, ER019, ER024, ER047. For more details refer to Error Codes section below.






Div
classdynamic-toc

Cancel a Transaction

Div
classapi-panel-expand


Div
classpost-api


Expand
titleCancel a Transaction

This operation enables you to cancel a transaction. A transaction can be cancelled only before the user attempts to authorize it. Transactions in any of the following states can be cancelled:

  • WAITING_FOR_SOURCE
  • WAITING_FOR_CONSENT


Use Case

The merchant may wish to cancel a transaction in the following scenarios:

  1. If the merchant wishes to give a time limit to the user to complete the transaction and the transaction is not completed within that time frame, then the merchant can check the state of the transaction and cancel the same.
  2. If the merchant provides a back button to user while they are within Zeta Payment context, then the user should be shown that going back will cancel their payment and then call the Cancel a Transaction API to gracefully conclude the transaction.

Button Hyperlink
titleRun using Zeta API Console
typestandard
classapi-button api-post
url#api-3

Functional Behaviour

Status
colourGreen
titlePost
/v1.0/zeta/transactions/{transactionId}/cancel

Input Details

Div
classcustomtabs


Div
classtabsmenu


Div
classtabsmenu_1

Input Parameters


Div
classtabsmenu_2

Request Header



Div
classtabscontent


Div
classtabpage_1


ParameterDescription
apiKey
Shared by Zeta with requester during the onboarding process.
Content-Type (Mandatory)application/json



Div
classtabpage_2


Code Block
languagegroovy
themeConfluence
titleRequest Header
{
 "apiKey" : "w9e75yifheq09tyehqriofhy0q349htorehtlGJKHu095338kehqo"
 "Content-Type" : "application/json"
}




Output Details

Div
classcustomtabs


Div
classtabsmenu


Div
classtabsmenu_1

Output Parameters


Div
classtabsmenu_2

Response Sample



Div
classtabscontent


Div
classtabpage_1


ParametersDescription
cancellationStatus
SUCCESS, FAILED.
reason
Reason in case of cancellation failure.



Div
classtabpage_2


Code Block
languagegroovy
themeConfluence
titleResponse Sample
{
    "transactionId" : "txn_hfsadh98iadsofi",
    "cancellationStatus" : "SUCCESS",
    "reason" : null
}





Info
titleError Codes

Possible error codes are - ER000, ER007, ER008, ER010, ER023.

For more details refer to Error Codes section below.






Div
classdynamic-toc

Get Transaction Details

Div
classapi-panel-expand


Div
classget-api


Expand
titleGet Transaction Details

This operation enables you to retrieve the transaction details. This API should be used only for Purchase transactions and not for Refund transactions.

Button Hyperlink
titleRun using Zeta API Console
typestandard
classapi-button api-get
url#api-4

Functional Behaviour

Status
colourBlue
titleGET

/v1.0/zeta/transactions/{transaction_id}

/v1.0/zeta/transactions/request_id/{request_id}

Input Details

Div
classcustomtabs


Div
classtabsmenu


Div
classtabsmenu_1

Input Parameters


Div
classtabsmenu_2

Request Header



Div
classtabscontent


Div
classtabpage_1


ParameterDescription
apiKeyShared by Zeta with requester during the onboarding process.
Content-Type (Mandatory)application/json



Div
classtabpage_2


Code Block
languagegroovy
themeConfluence
titleRequest Header
{
 "apiKey" : "w9e75yifheq09tyehqriofhy0q349htorehtlGJKHu095338kehqo"
 "Content-Type" : "application/json"
}




Output Details

Div
classcustomtabs


Div
classtabsmenu


Div
classtabsmenu_1

Output Parameters


Div
classtabsmenu_2

Response Sample



Div
classtabscontent


Div
classtabpage_1


ParametersDescription
transactionState

WAITING_FOR_SOURCE, WAITING_FOR_CONSENT,

CANCELLED, CANCELLED_BY_USER_AGENT,
WAITING_FOR_AUTHORIZATION, AUTHORIZED,

UNAUTHORIZED,

REFUND_INITIATED, REFUND_FAILED,

REFUND_COMPLETED, REFUND_DROPPED

transactionReceipt
Transaction receipt object with receiptID, payerInfo, payeeInfo and other details.



Div
classtabpage_2


Code Block
languagegroovy
themeConfluence
titleResponse Sample
{
  "transactionId": "txn_hfsadh98iadsofi",
  "requestId": "req_spar_vbdjkahffoasdh8746",
  "amount": {
    "currency": "INR",
    "value": "21"
  },
  "purposes": [
    {
      "purpose": "FOOD",
      "amount": {
        "currency": "INR",
        "value": "21"
      }
    }
  ],
  "transactionState": "AUTHORIZED",
  "failureReason" : null,
  "sourceId": "src_iwuehy89yhlfkjfd",
  "requestTime": "1505637992486",
  "transactionReceipt": {
    "authorisedAmount": {
      "amount": "21",
      "currency": "INR"
    },
    "debits": [
      {
        "ifi": 156699,
        "postingID": "852730",
        "value": {
          "amount": "20",
          "currency": "INR"
        },
        "productType": "Meal"
      },
      {
        "ifi": 156699,
        "postingID": "852731",
        "value": {
          "amount": "1",
          "currency": "INR"
        },
        "productType": "Meal"
      }
    ],
    "credits": [
      {
        "ifi": 156699,
        "postingID": "4254095",
        "value": {
          "amount": "21",
          "currency": "INR"
        }
      }
    ],
    "receiptID": 58275009977,
    "payeeInfo": {
      "name": "Mountain Trail Foods P",
      "location": "Bangalore",
      "type": "EXTERNAL_BUSINESS"
    },
    "payerInfo": {
      "imageURL": "",
      "name": "Archit Verma",
      "type": "ZETA_INDIVIDUAL"
    },
    "authorisationTime": 1505637992488
  }
}





Info
titleError Codes

Possible error codes are - ER000, ER007, ER010, ER013, ER017, ER019.

For more details refer to Error Codes section below.






Div
classdynamic-toc

Refund a Transaction

Div
classapi-panel-expand


Div
classpost-api


Expand
titleRefund a Transaction

The operation enables you to refund the full amount for a successful transaction.

Button Hyperlink
titleRun using Zeta API Console
typestandard
classapi-button api-post
url#api-5

Functional Behaviour

Status
colourGreen
titlePost
/v1.0/zeta/transactions/{transactionId}/cancel

Input Details

Div
classcustomtabs


Div
classtabsmenu


Div
classtabsmenu_1

Input Parameters


Div
classtabsmenu_2

Request Header


Div
classtabsmenu_3

Request Sample



Div
classtabscontent


Div
classtabpage_1


ParameterDescription
amount
Total amount of the transaction to be refunded.
Content-Type (Mandatory)application/json
requestId
Reference ID for the refund request. It is unique across transactions.
transactionId
Transaction ID returned by Zeta for original purchase transaction.



Div
classtabpage_2


Code Block
languagegroovy
themeConfluence
titleRequest Header
{
 "apiKey" : "w9e75yifheq09tyehqriofhy0q349htorehtlGJKHu095338kehqo"
 "Content-Type" : "application/json"
}



Div
classtabpage_3


Code Block
languagegroovy
themeConfluence
titleRequest Sample
{
 "requestId" : "requestIdStage10000026",
  "amount" : {
       "currency" : "INR",
       "value" : "6.00"
 },
 "transactionId" : "txn_69a2f3a5-0afb-46a3-86d2-1ec62881e067",
 "purposes" : [
            {
                "purpose" : "FOOD",
                "amount" : {
                    "currency" : "INR",
                    "value" : "6.00"
                }
            }
        ]
    }




Output Details

Div
classcustomtabs


Div
classtabsmenu


Div
classtabsmenu_1

Output Parameters


Div
classtabsmenu_2

Response Sample



Div
classtabscontent


Div
classtabpage_1


ParametersDescription
requestId
Request ID echoed back from the request payload.
purchaseTransactionId
Purchase transaction ID echoed back from the request payload.
refundTransactionId
Refund transaction ID generated by Zeta for the requested refund.



Div
classtabpage_2


Code Block
languagegroovy
themeConfluence
titleResponse Sample
{
  "requestId": "requestIdStage10000026",
  "purchaseTransactionId": "txn_28802c2f-2943-4bfc-bb87-a70dfbd936de",
  "refundTransactionId": "txn_f2a7802c-ef84-43c3-8615-5f706b995c23",
}





Info
titleError Codes

Possible refund-related error codes are - ER041, ER042.

For more details refer to Error Codes section below.






Div
classdynamic-toc

Charge Transaction with Authorization

Div
classapi-panel-expand


Div
classpost-api


Expand
titleCharge Transaction with Authorization

This operation enables you to make a transaction request by passing a Payment Authorization  which is obtained using the Request app2app authorization API.

Button Hyperlink
titleRun using Zeta API Console
typestandard
classapi-button api-post
url#api-6

Functional Behaviour

POST/v1.0/zeta/transactions/chargeWithAuth

Input Details

Div
classcustomtabs


Div
classtabsmenu


Div
classtabsmenu_1

Input Parameters


Div
classtabsmenu_2

Request Header


Div
classtabsmenu_3

Request Sample



Div
classtabscontent


Div
classtabpage_1


ParameterDescription

apiKey

Shared by Zeta with requester during the onboarding process.

Content-Type (Mandatory)application/json

merchantInfo

Information of the merchant (payee) for which payment is requested. This is shared by Zeta during onboarding process.

aid: Acquirer ID given by Zeta.

mid: Merchant ID given by Zeta.

tid: Terminal ID given by Zeta.

amount

Possible values supported for currencies INR for now. Value is in Rupees.

authorization

This is the same authorization that the merchant app gets back from Zeta in response to the Request app2app authorization API.



Div
classtabpage_2


Code Block
languagegroovy
themeConfluence
titleRequest Header
{
	"apiKey" : "w9e75yifheq09tyehqriofhy0q349htorehtlGJKHu095338kehqo"
    "Content-Type" : "application/json"
}



Div
classtabpage_3


Code Block
languagegroovy
themeConfluence
titleRequest Header
{
  "merchantInfo": {
    "aid": "zeta_1",
    "mid": "businessId",
    "tid": "storeId-counterId"
  },
  "amount": {
    "currency": "INR",
    "value": "20.00"
  },
  "purposes": [
    {
      "purpose": "FOOD",
      "amount": {
        "currency": "INR",
        "value": "20.00"
      }
    }
  ],
  "authorisation": {
  "headers": {
    "signature": "AAGDhSwwRAIgeSIoejAq6aRWYWVqD...",
    "signatoryJID": "fullUserJID"
  },
  "zetaUA": "Android/NA/Zeta/486",
  "version": "1.0",
  "request": {
    "version": "1.0",
    "merchantUA": "Android/NA/Spar/1.96",
    "requestId": "req_spar_vbdjkahffoasdh874627wqufid",
    "amount": {
      "currency": "INR",
      "value": "20.00"
    },
    "purposes": [
      {
        "purpose": "FOOD",
        "amount": {
          "currency": "INR",
          "value": "20.00"
        }
      }
    ],
    "description": "String merchants wants to show to user"
  },
  "certificate": {
    "certID": "cert_hfasifd-hfkadjsh-fhjasdkj",
    "type": "PUBLIC_KEY",
    "issuerJID": "zetamerchant.services.olympus",
    "subjectJID": "zeta_1-137953-1_1@business.zeta.in",
    "issuedOn": 1515430884684,
    "validTill": 1565430888684,
    "isRevoked": false,
    "base64EncodedPublicKey": "hfsdahifio89fsjdhafkld90sufodsaihfihhfjsadhlfidsaklfdho==",
    "certificateAttributes": {
      "name": "Spar.com",
      "environment": "production",
      "allowedIFIs": "SDX, ZETA_ANY",
      "paymentTo": "137953:1:1"
    },
    "purposeWithAttributes": {
      "appToApp": {}
    },
    "headers": {
      "signatoryJID": "zetamerchant.services.olympus",
      "signature": "jkfhsadfgsdagfyisa8o908ygdskjhf890-yisdfha"
    }
  },
  "issuedAt": 1515431182000,
  "validUntil": 1565431182000,
  "authorisationId": "app2app_gfhsdgakf-fsdjkafhdiou-fhsdajfhdoial-fhjsdaibk",
  "hmac": "auth_jfhasdfh-fhsakjdhfo-fksajdbhk"
}
}




Output Details

Div
classcustomtabs


Div
classtabsmenu


Div
classtabsmenu_1

Output Parameters


Div
classtabsmenu_2

Response Sample



Div
classtabscontent


Div
classtabpage_1


ParameterDescription

transactionState

WAITING_FOR_AUTHORIZATION, AUTHORIZED, CLEARANCE_INITIATED, CLEARED,
UNAUTHORIZED,

REFUND_INITIATED, REFUND_FAILED, REFUND_COMPLETED, REFUND_DROPPED

transactionReceipt

Transaction receipt object with receiptId, payerInfo, payeeInfo and other details.

sourceId

Tokenized information about the user’s instrument which was used to complete this payment. This can be saved and used again to get a new payment done through other payment API provided by Zeta.

requestTime

Timestamp when the transaction was requested.

failureCode

Represents the type of reason why the transaction got UNAUTHORIZED. Present only when the transaction is UNAUTHORIZED.

Possible failureCode ( more will be added eventually ): INSUFFICIENT_BALANCE, OTHERS

failureReason

Description about the reason for UNAUTHORIZED transaction.



Div
classtabpage_2


Code Block
languagegroovy
themeConfluence
titleResponse Sample
{
  "transactionId": "txn_hfsadh98iadsofi",
  "requestId": "req_spar_vbdjkahffoasdh8746",
  "amount": {
    "currency": "INR",
    "value": "20.0"
  },
  "purposes": [
    {
      "purpose": "FOOD",
      "amount": {
        "currency": "INR",
        "value": "20.0"
      }
    }
  ],
  "transactionState": "AUTHORIZED",
  "failureReason" : null,
  "failureCode" : null,
  "sourceId": "src_iwuehy89yhlfkjfd",
  "requestTime": "1505637992486",
  "transactionReceipt": {
    "authorisedAmount": {
      "amount": "21",
      "currency": "INR"
    },
    "debits": [
      {
        "ifi": 156699,
        "postingID": "852730",
        "value": {
          "amount": "20",
          "currency": "INR"
        },
        "productType": "Meal"
      },
      {
        "ifi": 156699,
        "postingID": "852731",
        "value": {
        "amount": "1",
          "currency": "INR"
        },
        "productType": "Meal"
      }
    ],
    "credits": [
      {
        "ifi": 156699,
        "postingID": "4254095",
        "value": {
          "amount": "21",
          "currency": "INR"
        }
      }
    ],
    "receiptId": 58275009977,
    "payeeInfo": {
      "name": "Spar Foods S",
      "location": "Bangalore",
      "type": "EXTERNAL_BUSINESS"
    },
     "payerInfo": {
      "imageURL": "",
      "name": "Archit Verma",
      "type": "ZETA_INDIVIDUAL"
    },
    "authorisationTime": 1505637992488
  }
}





Info

Error Codes

Possible error codes are - ER000, ER007, ER008, ER011, ER013, ER019, ER022.

For more details refer to Error Codes.






Div
classdynamic-toc

Get a Source

Div
classapi-panel-expand


Div
classget-api


Expand
titleGet a Source

This operation enables you to retrieve the details of a source.

Button Hyperlink
titleRun using Zeta API Console
typestandard
classapi-button api-get
url#api-7

Functional Behaviour

Status
colourBlue
titleGET
/v1.0/zeta/sources/{sourceId} /v1.0/zeta/sources/{saveSourceRequestId}

Input Details

Div
classcustomtabs


Div
classtabsmenu


Div
classtabsmenu_1

Input Parameters


Div
classtabsmenu_2

Request Header



Div
classtabscontent


Div
classtabpage_1


ParameterDescription
apiKeyShared by Zeta with requester during the onboarding process.
Content-Type (Mandatory)application/json



Div
classtabpage_2


Code Block
languagegroovy
themeConfluence
titleRequest Header
{
 "apiKey" : "w9e75yifheq09tyehqriofhy0q349htorehtlGJKHu095338kehqo"
 "Content-Type" : "application/json"
}




Output Details

Div
classcustomtabs


Div
classtabsmenu


Div
classtabsmenu_1

Output Parameters


Div
classtabsmenu_2

Response Sample



Div
classtabscontent


Div
classtabpage_1


ParametersDescription
sourceId
Source ID for which details are fetched.
sourceTypeCARD, WALLET, PHONE_NUMBER.



Div
classtabpage_2


Code Block
languagegroovy
themeConfluence
titleResponse Sample
{
  "sourceId": "src_iwuehy89yhlfkjfd",
  "sourceInfo" : {
		"sourceType" : "PHONE_NUMBER",
		"phoneNumber" : "+918xxxxxxxx5"
	}
}





Info
titleError Codes

Possible error codes are - ER000, ER007, ER013, ER014, ER017, ER019.

For more details refer to Error Codes section below.






Div
classdynamic-toc

HasBalance

Div
classapi-panel-expand


Div
classpost-api


Expand
titleHasBalance

This operation enables you to check if the user has sufficient balance to make a transaction of specific amount to a specific merchant.


Use Case

Suggested to be used before directing the user to PayWithZeta option so that the merchant can ensure that the user will have sufficient balance to complete the transaction, else they can suggest a different payment option to the user.

Button Hyperlink
titleRun using Zeta API Console
typestandard
classapi-button api-post
url#api-8

Functional Behaviour

Status
colourGreen
titlePost

/v1.0/zeta/transactions/hasBalance

Input Details

Div
classcustomtabs


Div
classtabsmenu


Div
classtabsmenu_1

Input Parameters


Div
classtabsmenu_2

Request Header


Div
classtabsmenu_3

Request Sample



Div
classtabscontent


Div
classtabpage_1


ParameterDescription
merchantInfo
Information of the merchant (payee) for which the user balance has to be checked for making a transaction for a specific amount.
Content-Type (Mandatory)application/json
amountAmount against which user balance has to be checked.



Div
classtabpage_2


Code Block
languagegroovy
themeConfluence
titleRequest Header
{
 "apiKey" : "w9e75yifheq09tyehqriofhy0q349htorehtlGJKHu095338kehqo"
 "Content-Type" : "application/json"
}



Div
classtabpage_3


Code Block
languagegroovy
themeConfluence
titleRequest Header
{
    "merchantInfo": {
        "aid": "zeta_01",
        "mid": "usdfhaki879yh",
        "tid": "56273158bj",
    },
    "sourceId" : "src_wqe47hxfjksor89y4",
    "amount" : {
        "currency": "INR",
        "value": "20.00"
    },
    "purposes": [
        {
            "purpose": "FOOD",
            "amount": {
                "currency": "INR",
                "value": "20.00"
            }
        }            
    ]
}




Output Details

Div
classcustomtabs


Div
classtabsmenu


Div
classtabsmenu_1

Output Parameters


Div
classtabsmenu_2

Response Sample



Div
classtabscontent


Div
classtabpage_1


ParametersDescription
sourceIdSource ID echoed back from request payload.
sourceInfoBasic information about the sourceId.
hasBalanceIndicates whether the user owning the source has sufficient balance to pay the amount mentioned in the request payload to the merchant.



Div
classtabpage_2


Code Block
languagegroovy
themeConfluence
titleResponse Sample
{
    "sourceId": "src_iwuehy89yhlfkjfd",
    "sourceInfo" : {
        "sourceType" : "PHONE_NUMBER",
        "phoneNumber" : "+918xxxxxxxxx5"
    },
    "hasBalance" : true
}





Info
titleError Codes

Possible error codes are - ER000, ER007, ER013, ER014, ER017, ER019.

For more details refer to Error Codes section below.






Div
classdynamic-toc

Save a Source

Div
classapi-panel-expand


Div
classpost-api


Expand
titleSave a Source

This operation enables you to save a source.


Use Case

Payment flows which require the user to have sufficient balance before starting the transaction, can ask the user to first link his Zeta account ( i.e save source) and then take him to the transaction flow.

Button Hyperlink
titleRun using Zeta API Console
typestandard
classapi-button api-post
url#api-9

Functional Behaviour

Status
colourGreen
titlePost
/v1.0/zeta/sources/save

Input Details

Div
classcustomtabs


Div
classtabsmenu


Div
classtabsmenu_1

Input Parameters


Div
classtabsmenu_2

Request Header


Div
classtabsmenu_3

Request Sample



Div
classtabscontent


Div
classtabpage_1


ParameterDescription

requestId

Generated by the requester. Should be globally unique. Zeta will reject a duplicate requestId.
failureUrlRequester’s URL where Zeta will redirect on failure of authentication.
Content-Type (mandatory)application/json
successUrlRequester’s URL where Zeta will redirect on failure of authentication.



Div
classtabpage_2


Code Block
languagegroovy
themeConfluence
titleRequest Header
{
 "apiKey" : "w9e75yifheq09tyehqriofhy0q349htorehtlGJKHu095338kehqo"
 "Content-Type" : "application/json"
}



Div
classtabpage_3


Code Block
languagegroovy
themeConfluence
titleRequest Header
{
    "requestId": "req_spar_vbdjkahffoasdh874627wqufid",      
    "failureUrl": "http://merchant-site/cardsavefailed.php",
    "successUrl": "http://merchant-site/cardsavesuccess.php",
    "sourceInfo": {
        "sourceType": "PHONE_NUMBER",
        "phoneNumber": "+918xxxxxxxx85"
    },
    "permissions": [
        "SAVE_FOR_FUTURE",
        "GET_BALANCE"
    ]
}




Output Details

Div
classcustomtabs


Div
classtabsmenu


Div
classtabsmenu_1

Output Parameters


Div
classtabsmenu_2

Response Sample



Div
classtabscontent


Div
classtabpage_1


ParametersDescription
requestIdRequest ID echoed back from request payload.
redirectUserToURL where requester should redirect the user to complete the card save flow.



Div
classtabpage_2


Code Block
languagegroovy
themeConfluence
titleResponse Sample
{
  "requestId": "req_spar_vbdjkahffoasdh8746",
  "redirectUserTo":
"https://ecom.zetaapps.in/v1.0/zeta/transactions/initiate?q=8o32hjsfad930uklfsajdfo"
}





Info
titleError Codes

Possible error codes are - ER000, ER007, ER013, ER014, ER017, ER019.

For more details refer to Error Codes section below.






Div
classdynamic-toc


Div
classapi-panel-expand


Div
classget-api


Expand
titleRequest App2App Authorization

This API enables you to get authorization for a given payment request. It is exposed by Zeta mobile apps and should be called via deep link. 

Functional Behaviour

Zeta app deep linkAndroid/iOS: zeta://payAuth

Input Details

Div
classcustomtabs


Div
classtabsmenu


Div
classtabsmenu_1

Input Parameters


Div
classtabsmenu_2

Request Sample



Div
classtabscontent


Div
classtabpage_1


ParameterDescription

requestId

Transaction Request ID is generated by the merchant app and should be globally unique. Zeta will reject a duplicate Transaction ID.

Content-Type (mandatory)application/json

certificate

This will be shared by Zeta with the merchant during the integration process.

merchantUA

Merchant user agent details.
Format: Platform/SDKVersion/AppId/AppVersion

amount

Possible values supported for currencies INR for now. Value is in Rupees.

purposes

Each purpose should have amount (in the base currency of transaction). Possible purpose are “FOOD”.

callbackUrl

This is specific to iOS applications. The callback URL where the Zeta app will return back the response of this API call.



Div
classtabpage_2


Code Block
languagegroovy
themeConfluence
titleRequest Sample
{
  "request": {
    "version": "1.0",
    "merchantUA": "Android/NA/Spar/1.96",
    "requestId": "req_spar_vbdjkahffoasdh874627wqufid",
    "amount": {
      "currency": "INR",
      "value": "20.00"
    },
    "purposes": [
      {
        "purpose": "FOOD",
        "amount": {cl
          "currency": "INR",
          "value": "20.00"
        }
      }
    ],
    "logoURL": "https://s3.spar.com/logo.png",
    "description": "String merchants wants to show to user",
    "callbackUrl": ""
  },
  "certificate": {
    "certID": "cert_hfasifd-hfkadjsh-fhjasdkj",
    "type": "PUBLIC_KEY",
    "issuerJID": "zetamerchant.services.olympus",
    "subjectJID": "zeta_1-12-3242_21321@business.zeta.in",
    "issuedOn": 1515430884684,
    "validTill": 1565430885684,
    "isRevoked": false,
    "base64EncodedPublicKey": "hfsdahifio89fafkld90sufodsaihfihhfjsadhlfidsaklfdho==",
    "certificateAttributes": {
      "name": "Spar.com",
      "Environment": "production",
      "allowedIFIs": "SDX, ZETA_ANY",
      "paymentTo": "137953:1:1"
    },
    "purposeWithAttributes": {
      "appToApp": {}
    },
    "headers": {
      "signatoryJID": "zetamerchant.services.olympus",
      "signature": "jkfhsadfgsdagfyisa8o908ygdskjhf890-=yisdfha"
    }
  }
}




Output Details

Div
classcustomtabs


Div
classtabsmenu


Div
classtabsmenu_1

Output Parameters


Div
classtabsmenu_2

Response Sample



Div
classtabscontent


Div
classtabpage_1


ParameterDescription
merchantUA
Merchant user agent details.
Format: Platform/SDKVersion/AppId/AppVersion
requestIdTransaction Request ID  is generated by the merchant app and should be globally unique. Zeta will reject a duplicate Transaction ID.

certificate

This  will be shared by Zeta with the merchant during the integration process.

purposes

Each purpose should have amount (in the base currency of transaction).  Possible purpose are “FOOD”, etc.

amount

Possible values supported for currencies INR for now.  Value is in Rupees.



Div
classtabpage_2


Code Block
languagegroovy
themeConfluence
titleResponse Sample
{
  "headers": {
    "signature": "AAGDhSwwRAIgeSIoejAq6aRWYWVqD...",
    "signatoryJID": "fullUserJID"
  },
  "zetaUA": "Android/NA/Zeta/486",
  "version": "1.0",
  "request": {
    "version": "1.0",
    "merchantUA": "Android/NA/Spar/1.96",
    "requestId": "req_spar_vbdjkahffoasdh874627wqufid",
    "amount": {
      "currency": "INR",
      "value": "20.00"
    },
    "purposes": [
      {
        "purpose": "FOOD",
        "amount": {
          "currency": "INR",
          "value": "20.00"
        }
      }
    ],
    "description": "String merchants wants to show to user"
  },
  "certificate": {
    "certID": "cert_hfasifd-hfkadjsh-fhjasdkj",
    "type": "PUBLIC_KEY",
    "issuerJID": "zetamerchant.services.olympus",
    "subjectJID": "zeta_1-137953-1_1@business.zeta.in",
    "issuedOn": 1515430884684,
    "validTill": 1565430888684,
    "isRevoked": false,
    "base64EncodedPublicKey": "hfsdahifio89fsjdhafkld90sufodsaihfihhfjsadhlfidsaklfdho==",
    "certificateAttributes": {
      "name": "Spar.com",
      "environment": "production",
      "allowedIFIs": "SDX, ZETA_ANY",
      "paymentTo": "137953:1:1"
    },
    "purposeWithAttributes": {
      "appToApp": {}
    },
    "headers": {
      "signatoryJID": "zetamerchant.services.olympus",
      "signature": "jkfhsadfgsdagfyisa8o908ygdskjhf890-yisdfha"
    }
  },
  "issuedAt": 1515431182000,	//in epoch
  "validUntil": 1565431182000,
  "authorisationId": "app2app_gfhsdgakf-fsdjkafhdiou-fhsdajfhdoial-fhjsdaibk",
  "hmac": "auth_jfhasdfh-fhsakjdhfo-fksajdbhk"
}





Note
titleDecline Codes

Auth Decline By User (300) :

  • Declined By User


Auth Decline By UserAgent (3XX):

  • Abuse Limits(301)

  • Repeated Request ID with same certificate(302)

  • Stale Request(303)

  • User didn’t respond in time(304)

  • Unsupported currency(305)

  • User is not logged in(306)


Invalid Request (4XX):

  • Invalid Cert(400)

  • Missing parameters(401)

  • Invalid Data Types for parameters(402)

  • Unsupported Version(403)








Div
classmethod-example


Div
classexpand-api-consolue



Open api
{
  "swagger": "2.0",

  "host": "https://pay-gw.preprod.zeta.in/",
  "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"
        ],
        "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"
        ],
        "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"
        ],
        "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"
        ],
        "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"
        ],
        "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"
        ],
        "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"
        ],
        "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"
        ],
        "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"
          ]
        }
      }
    }
  }
}





Panel

Table of Contents
maxLevel1


Div
classrelated-articles related-articles-sidebar

Related Articles

Content by Label
showLabelsfalse
max6
spacesZET
showSpacefalse
sortcreation
typepage
cqllabel in ("setmercaccsetmerchpwz","provdevprovdevpwz","ecominteg","app2appinteg","autointeg") and type = "page" and space = "PWZ"
labelstest9