Unknown macro: {style}

.page-metadata

Unknown macro: {display}

Page tree
Skip to end of metadata
Go to start of metadata

Introduction

API reference guide contains technical reference information for RESTful APIs in 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.

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

Request for Developer Access



POST Create a Transaction

 Create a Transaction

This operation enables you to create a transaction.

Run using Zeta API Console

Functional Behaviour

POST
/v1.0/zeta/transactions

Input Details

Input Parameters

Request Header

Request Sample

ParameterDescription
apiKey
(
mandatory)
Unique identifier provided to requester during onboarding. This parameter is required to access the operation.
Content-Type
(mandatory)
The MIME type for data must be set to application/json.
requestIdUnique transaction identifier generated by the requester. Zeta will reject a duplicate transaction ID.

sourceId

(optional)

Unique identifier for the saved payment source when transaction is created. Use this parameter to allow customer to choose from saved sources when completing a transaction.
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.

amountTransaction value in Rupees. Possible value supported for currencies: INR
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.

purposesThe purpose of transaction. Each purpose should have amount (in the base currency of transaction).
Possible values: "FOOD", "FUEL".
failureUrlRequester’s URL to which Zeta will redirect on failed transaction authorization.
successUrlRequester’s URL to which Zeta will redirect on successful transaction authorization.
Request Header
{
 "apiKey" : "w9e75yifheq09tyehqriofhy0q349htorehtlGJKHu095338kehqo"
 "Content-Type" : "application/json"
}
Request 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

Output Parameters

Response Sample

ParametersDescription
redirectUserToURL to which 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'.
Response 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"
}

Error Codes

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

For more details, see Error Codes.

POST Create Transaction with SourceInfo

 Create 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.

Run using Zeta API Console

Functional Behaviour

POST
/v1.0/zeta/transactions/createWithSourceInfo

Input Details

Input Parameters

Request Header

Request Sample

ParameterDescription
apiKey
(
mandatory)
Unique identifier provided to requester during onboarding. The parameter must be provided while accessing the operation.
Content-Type
(mandatory)
The MIME type for data must be set to application/json.
requestIdUnique transaction identifier generated by the requester. 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.
amountTransaction value in Rupees. Possible value supported for currencies: INR
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.

purposesThe purpose of transaction. Each purpose should have amount (in the base currency of transaction).
Possible values: "FOOD", "FUEL".
failureUrlRequester’s URL to which Zeta will redirect on failed transaction authorization.
successUrlRequester’s URL to which 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.

Request Header
{
 "apiKey" : "w9e75yifheq09tyehqriofhy0q349htorehtlGJKHu095338kehqo"
 "Content-Type" : "application/json"
}
Request 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

Output Parameters

Response Sample

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.
Response 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"
}

Error Codes

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

For more details, see Error Codes.

POST Cancel a Transaction

 Cancel 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.

Run using Zeta API Console

Functional Behaviour

POST
/v1.0/zeta/transactions/{transactionId}/cancel

Input Details

Input Parameters

Request Header

ParameterDescription

apiKey
(
mandatory)

Unique identifier provided to requester during onboarding. The parameter must be provided while accessing the operation.
Content-Type
(mandatory)
The MIME type for data must be set to application/json.
Request Header
{
 "apiKey" : "w9e75yifheq09tyehqriofhy0q349htorehtlGJKHu095338kehqo"
 "Content-Type" : "application/json"
}

Output Details

Output Parameters

Response Sample

ParametersDescription
cancellationStatus
SUCCESS, FAILED.
reason
Reason in case of cancellation failure.
Response Sample
{
    "transactionId" : "txn_hfsadh98iadsofi",
    "cancellationStatus" : "SUCCESS",
    "reason" : null
}

Error Codes

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

For more details, see Error Codes.

GET Get Transaction Details

 Get 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.

Run using Zeta API Console

Functional Behaviour

GET

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

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

Input Details

Input Parameters

Request Header

ParameterDescription
apiKey
(
mandatory)
Unique identifier provided to requester during onboarding. The parameter must be provided while accessing the operation.
Content-Type
(mandatory)
The MIME type for data must be set to application/json.
Request Header
{
 "apiKey" : "w9e75yifheq09tyehqriofhy0q349htorehtlGJKHu095338kehqo"
 "Content-Type" : "application/json"
}

Output Details

Output Parameters

Response Sample

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.
Response 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
  }
}

Error Codes

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

For more details, see Error Codes.

POST Refund a Transaction

 Refund a Transaction

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

Run using Zeta API Console

Functional Behaviour

POST
/v1.0/zeta/transactions/refund

Input Details

Input Parameters

Request Header

Request Sample

ParameterDescription
amount
Total or partial amount to be refunded.
Content-Type
(mandatory)
The MIME type for data must be set to application/json.
requestId
Reference ID for the refund request. It is unique across transactions.
transactionId
Transaction ID returned by Zeta for original purchase transaction.
Request Header
{
 "apiKey" : "w9e75yifheq09tyehqriofhy0q349htorehtlGJKHu095338kehqo"
 "Content-Type" : "application/json"
}
Request 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

Output Parameters

Response Sample

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.
Response Sample
{
  "requestId": "requestIdStage10000026",
  "purchaseTransactionId": "txn_28802c2f-2943-4bfc-bb87-a70dfbd936de",
  "refundTransactionId": "txn_f2a7802c-ef84-43c3-8615-5f706b995c23",
}

Error Codes

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

For more details, see Error Codes.

POST Charge Transaction with Authorization V1

 Charge Transaction with Authorization V1

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

Run using Zeta API Console

Functional Behaviour

POST
/v1.0/zeta/transactions/chargeWithAuth

Input Details

Input Parameters

Request Header

Request Sample

ParameterDescription
apiKey
(mandatory)
Unique identifier provided to requester during onboarding. This parameter is required to access the operation.
Content-Type
(mandatory)
The MIME type for data must be set to application/json.
requestIdUnique transaction identifier generated by the requester. Zeta will reject a duplicate transaction ID.

sourceId

(optional)

Unique identifier for the saved payment source when transaction is created. Use this parameter to allow customer to choose from saved sources when completing a transaction.
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.

Request Header
{
 "apiKey" : "w9e75yifheq09tyehqriofhy0q349htorehtlGJKHu095338kehqo"
 "Content-Type" : "application/json"
}
Request Sample
{
      "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

Output Parameters

Response Sample

ParametersDescription
redirectUserToURL to which requester redirects user to complete authorization of transaction.
The redirection returns an HTML page which collects the user’s vector (phone No, Card Details) 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'.
Response 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"
}

Error Codes

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

For more details, see Error Codes.

POST Charge Transaction with Authorization V2

 Charge Transaction with Authorization V2

This operation allows you to automatically debit funds from the user, provided the user has given auto-debit permissions in Save a Source API.

Run using Zeta API Console

Functional Behaviour

POST
/v2.0/zeta/transactions/chargeWithAuth

Input Details

Input Parameters

Request Header

Request Sample

ParameterDescription
apiKey
(mandatory)
Unique identifier provided to requester during onboarding. This parameter is required to access the operation.
Content-Type
(mandatory)
The MIME type for data must be set to application/json.
requestIdUnique transaction identifier generated by the requester. Zeta will reject a duplicate transaction ID.
amountTransaction value in Rupees. Possible value supported for currencies: INR
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.

purposesThe purpose of transaction. Each purpose should have amount (in the base currency of transaction).
For example, "FOOD", "FUEL" and so on.
validUntilTimestamp until the requested authorization key is valid. Value must be in Epoch time format.
authorizationContains details of requested amount like currency and value to authorize.
authorizationTypePre-defined type of the requested authorization.
Request Header
{
 "apiKey" : "EbWfNeNaB08u8aTEVYC4WEXCoLhxsEkPQMbAYlW03ecegquilaFMEt47z7EiX6RB"
 "Content-Type" : "application/json"
}
Request Sample
{
 "requestId": "AutoDebit-15",
 "merchantInfo": {
 "aid": "zeta_1",
 "mid": "158127",
 "tid": "1_1"
 },
 "authorizationType": "PREAUTHORIZED_AUTH",
 "authorization": {
 "request": {
 "amount": {
 "currency": "INR",
 "value": "0.01"
 },
 "purposes": [
 {
 "amount": {
 "currency": "INR",
 "value": "0.01"
 },
 "purpose": "FOOD"
 }
 ]
 },
 "validUntil": 1625623739555,
 "sourceId" : "src_232aa26d-0758-4992-9d11-498ba53cfe5e"
 }
}

Output Details

Output Parameters

Response Sample

ParametersDescription
purchaseTransactionIdTransaction ID of the purchase.
transactionState'WAITING_FOR_CONSENT' OR 'WAITING_FOR_SOURCE'.
amountTransaction value in Rupees. Possible value supported for currencies: INR
purposesThe purpose of transaction. Each purpose should have amount (in the base currency of transaction).
For example, "FOOD", "FUEL" and so on.
Response Sample
{
"captureRequestId": null,
"purchaseTransactionId": "txn_bca6f4f7-582b-4dba-84d6-4d88c74230b2",
"purchaseRequestId": "AutoDebit-692e1",
"amount": {
"currency": "INR",
"value": "0.01"
},
"purposes": [
{
"purpose": "FOOD",
"amount": {
"currency": "INR",
"value": "0.01"
}
}
],
"sourceId": null,
"transactionState": "AUTHORIZED",
"failureReason": null,
"failureCode": null,
"requestTime": 1566800719449,
"merchantInfo": {
"name": "name:287863:1",
"mid": "287863",
"aid": "zeta_1",
"tid": "1_1"
},
"transactionReceipt": {
"authorisedAmount": {
"currency": "INR",
"value": "0.01"
},
"debits": null,
"credits": null,
"receiptID": 1198211168769,
"payeeInfo": {
"name": "name:287863:1",
"location": null,
"type": null
},
"payerInfo": null,
"authorisationTime": 1566800719449
},
"retrievalReferenceNumber": null
}

Error Codes

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

For more details, see Error Codes.

GET Get a Source

 Get a Source

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

Run using Zeta API Console

Functional Behaviour

GET
/v1.0/zeta/sources/{sourceId} /v1.0/zeta/sources/{saveSourceRequestId}

Input Details

Input Parameters

Request Header

ParameterDescription
apiKey
(
mandatory)
Unique identifier provided to requester during onboarding. The parameter must be provided while accessing the operation.
Content-Type
(mandatory)
The MIME type for data must be set to application/json.
Request Header
{
 "apiKey" : "w9e75yifheq09tyehqriofhy0q349htorehtlGJKHu095338kehqo"
 "Content-Type" : "application/json"
}

Output Details

Output Parameters

Response Sample

ParametersDescription
sourceId
Source ID for which details are fetched.
sourceTypeCARD, WALLET, PHONE_NUMBER.
Response Sample
{
  "sourceId": "src_iwuehy89yhlfkjfd",
  "sourceInfo" : {
		"sourceType" : "PHONE_NUMBER",
		"phoneNumber" : "+918xxxxxxxx5"
	}
}

Error Codes

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

For more details, see Error Codes.

POST Has Balance

 HasBalance

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.

Run using Zeta API Console

Functional Behaviour

POST

/v1.0/zeta/sources/hasBalance

Input Details

Input Parameters

Request Header

Request Sample

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)
The MIME type for data must be set to application/json.
amountAmount against which user balance has to be checked.
Request Header
{
 "apiKey" : "w9e75yifheq09tyehqriofhy0q349htorehtlGJKHu095338kehqo"
 "Content-Type" : "application/json"
}
Request 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

Output Parameters

Response Sample

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.
Response Sample
{
    "sourceId": "src_iwuehy89yhlfkjfd",
    "sourceInfo" : {
        "sourceType" : "PHONE_NUMBER",
        "phoneNumber" : "+918xxxxxxxxx5"
    },
    "hasBalance" : true
}

Error Codes

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

For more details, see Error Codes.

POST Save a Source

 Save a Source

This operation enables you to save a source.


Use Case

User can be asked to first link his Zeta account (save source) and then take him to the transaction flow.

Run using Zeta API Console

Functional Behaviour

POST
/v1.0/zeta/sources/save

Input Details

Input Parameters

Request Header

Request Sample

ParameterDescription

requestId

Generated by the requester. Should be globally unique. Zeta will reject a duplicate requestId.
failureUrlRequester’s URL to which Zeta will redirect on failed transaction authorization.
Content-Type
(mandatory)
The MIME type for data must be set to application/json.
successUrlRequester’s URL to which Zeta will redirect on successful transaction authorization.
Request Header
{
 "apiKey" : "w9e75yifheq09tyehqriofhy0q349htorehtlGJKHu095338kehqo"
 "Content-Type" : "application/json"
}
Request 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

Output Parameters

Response Sample

ParametersDescription
requestIdRequest ID echoed back from request payload.
redirectUserToURL where requester should redirect the user to complete the card save flow.
Response Sample
{
  "requestId": "req_spar_vbdjkahffoasdh8746",
  "redirectUserTo":
"https://ecom.zetaapps.in/v1.0/zeta/transactions/initiate?q=8o32hjsfad930uklfsajdfo"
}

Error Codes

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

For more details, see Error Codes.
 Request 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

Input Parameters

Request Sample

ParameterDescription

requestId

Unique transaction Request ID generated by the merchant. Zeta will reject a duplicate Transaction ID.

Content-Type
(mandatory)
The MIME type for data must be set to 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

The purpose of transaction. Each purpose should have amount (in the base currency of transaction).
Possible values: "FOOD", "FUEL".

callbackUrl

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

Request 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": {
          "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

Output Parameters

Response Sample

ParameterDescription

merchantUA

Merchant user agent details.
Format: Platform/SDKVersion/AppId/AppVersion
requestIdUnique transaction Request ID generated by merchant. Zeta will reject a duplicate Transaction ID.

certificate

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

purposes

The purpose of transaction. Each purpose should have amount (in the base currency of transaction).
Possible values: "FOOD", "FUEL".

amount

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

Response 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"
}

Decline 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)



{ "swagger": "2.0", "host": "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": " ", "required": true, "schema": { "$ref": "#/definitions/TransactionCreateRequest" } }, { "name": "apiKey", "in": "header", "description": " ", "required": true, "type": "string" } ], "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": " ", "required": true, "schema": { "$ref": "#/definitions/TransactionCreateWithSourceInfoRequest" } }, { "name": "apiKey", "in": "header", "description": " ", "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": " ", "required": true, "type": "string" }, { "name": "apiKey", "in": "header", "description": " ", "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": " ", "required": true, "type": "string" }, { "name": "apiKey", "in": "header", "description": " ", "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": " ", "required": true, "schema": { "$ref": "#/definitions/RefundTransactionRequest" } }, { "name": "apiKey", "in": "header", "description": " ", "required": true, "type": "string" } ], "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": " ", "required": true, "type": "string" }, { "name": "apiKey", "in": "header", "description": " ", "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": " ", "required": true, "schema": { "$ref": "#/definitions/ChargeWithAuthRequest" } }, { "name": "apiKey", "in": "header", "description": " ", "required": true, "type": "string" } ], "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": " ", "required": true, "schema": { "$ref": "#/definitions/HasBalanceRequest" } }, { "name": "apiKey", "in": "header", "description": " ", "required": true, "type": "string" } ], "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": " ", "required": true, "schema": { "$ref": "#/definitions/SaveSourceRequest" } }, { "name": "apiKey", "in": "header", "description": " ", "required": true, "type": "string" } ], "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" ] } } } } }