Page tree

Versions Compared

Key

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


Tabs Container
idTabs
classremove-export-pdf check__iframe__container
directionhorizontal


Tabs Page
titleAPI Specification

Overview

You can make use of the following APIs during a payout scenario. This section explains about all RESTful operations including their request and response parameters.

Note

APIs presented here are only for happy flow without considering the payment exception cases. We shall publish the error codes soon.

Operation: Create a Payout

This operation enables you to create a transfer.

Functional Behaviour

Status
colourGreen
titlePost

/optima/corporates/{corpID}/companies/{companyID}/
programs/{programID}/disbursements/

Input Parameters

Path ParametersDescription
corpIDA unique corporate ID assigned to the requester’s system
companyIDA unique company ID assigned to the requester’s system
programIDA unique program ID assigned to the requester’s system
Header ParametersDescription
AuthorizationValue is "bearer token". Zeta will share this token with the requester.
Body ParametersDescription

requestID

Transfer Request ID

This is generated by the requester and should be unique in the requester's system. The response is idempotent on this combination.

type

User account type. We shall support “to_bank_account”, “to_cloud_card” in future.

amount

Value is in paises.

Possible values supported for currencies is “INR” for now.

beneficiary

Information of the beneficiary for whom payment transfer is requested.
id: A unique beneficiary ID in the requester’s system

name: Name of the user to which transfer needs to be initiated

email: Email address of the user to which transfer needs to be initiated

phoneNumber: Phone number of the user to which transfer needs to be initiated

pan: PAN number of the user

aadhar: Aadhar number of the user

description (optional)Custom description that you wish to populate in the response payload
scheduledAt (optional)Custom field that you wish to populate in the response payload. Supported value is "now".
attributes (optional)Custom attribute that you wish to populate in the response payload


Code Block
languagegroovy
themeConfluence
titleRequest Header
{
	"Authorization": "Bearer nknkdhdj444474848jfnmccvnmADDFFF"
}


Code Block
languagegroovy
themeConfluence
titleRequest Body
{
	"requestID": "requestId_hello_12317",
	"type": "to_wallet",
	"amount":{
		"value": 10000,
		"currency": "INR"
	},
	"beneficiary": {
		"id": "Dir-13",
		"name":"Anthony D'souza",
		"email":"ds@zeta.in",
		"phoneNumber": "phone number of the user",
		"pan": "PAN of the user",
		"aadhar":"aadhar of the user"
	},
	"description": "test payout",
	"scheduledAt": "now",
	"attributes": {
		"age1": 10
	}
}

Output Parameters

Parameters

Description

requestID

Requester ID same as in request payload

status

“SUCCESS” or “PENDING” or “FAILED” or "MOVED_TO_ESCROW"


Code Block
languagegroovy
themeConfluence
titleResponse Sample
{
    "id": 35,
    "requestID": "requestId_hello_12317",
    "type": "to_wallet",
    "corpID": 3171,
    "companyID": 9443,
    "programID": 16592,
    "amount": {
        "currency": "INR",
        "amount": 10000
    },
    "employeeID": 2288426,
    "description": "test payout",
    "attributes": {
        "age": "10"
    },
    "status": "SUCCESS",
    "scheduledAt": 1516559610000,
    "createdAt": 1516559609000,
    "updatedAt": 1516559613000
}

Payout Status Codes

The following payout status codes are shown to the corporate side post Zeta authorization.

Payout Status

Description

SUCCESS

Beneficiary has received the transfer

PENDING

Transfer to beneficiary is pending and need to be retried by the requester with the same requestID to get the updated status

FAILED

Transfer to beneficiary failed. This could be due to low balance in the requester's funding account.

MOVED_TO_ESCROW

Transfer successful, waiting for beneficiary to signup on zeta.


Note

To resolve any payout related issues, you may need to share requestID with Zeta.

Operation: Check a Beneficiary or User Existence

This operation enables you to check the status of the valid consumer account if the user exists in the Zeta.

Functional Behaviour

Status
colourBlue
titleGET

/zeta/hasUser?identityType=[PHONE_NUMBER/EMAIL]&
identity={phone no}or{emailID}

Input Parameters

Query ParametersDescription

identityType

User type supported as "PHONE_NUMBER" or "EMAIL".

identity

Phone number or email address of the user or beneficiary

Header ParametersDescription
AuthorizationValue is "bearer token". Zeta will share this token with the requester.


Code Block
languagegroovy
themeConfluence
titleRequest Header
{
	"Authorization": "Bearer nknkdhdj444474848jfnmccvnmADDFFF"
}

Output Parameters

Parameters

Description

userExists

"true" or "false"


Code Block
languagegroovy
themeConfluence
titleResponse Sample
{
 "userExists": true // [false],
}




{ "swagger": "2.0", "info": { "version": "1.0", "title": "Overview", "description": "Test Disbursement APIs in an integrated Zeta sandbox while learning about Zeta APIs. To get started, contact Zeta to register and get access to API endpoints.", "contact": { "name": "Zeta", "email": "raj.madhup@zeta.tech" }, },

Overview

Test Disbursement APIs in an integrated Zeta sandbox while learning about Zeta APIs. To get started, contact Zeta to register and get access to the Zeta API endpoints.

Tabs Page
titleTest APIs
classiframe__layout__tab
Open api
Button Hyperlink
titleContact Zeta
typestandard
urlhttps://docs.google.com/forms/d/e/1FAIpQLSeZPc4Povr-2CPJH99vTa0TG3_aoiAqzwiwmCaboVhx1UOpJw/viewform
targettrue


Open api
{
  "swagger": "2.0",
  
  
  "host": "api.stage.zeta.in",
  "basePath": "/",
  "tags": [
		{
			"name": "Disbursement APIs",
			"description": "Delivering enterprise payout solutions"
		}
	],
  "schemes": [
    "https"
  ],
  "consumes": [
    "application/json"
  ],
  "produces": [
    "application/json"
  ],
  "paths": {
    "/optima/corporates/{corpId}/companies/{compId}/programs/{programId}/disbursements": {
      "post": {
         "tags": [
					"Disbursement APIs"
				],        
         "summary": "disbursementCreate a Payout",
        "operationId": "OptimaCorporatesCompaniesProgramsProgramIdDisbursementsByCorpIdAndCompIdPost",
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "Body",
            "in": "body",
            "required": true,
            "description": "",
            "schema": {
              "$ref": "#/definitions/DisbursementRequest"
            }
          },
          {
            "name": "Content-Type",
		    "in": "header",
		    "required": true,
		    "type": "string",
		    "description": ""
		  },
          {
            "name": "Authorization",
            "in": "header",
            "required": true,
            "type": "string",
            "description": "A bearer token shared by Zeta"
          },
          {
            "name": "corpId",
            "in": "path",
            "required": true,
            "type": "string",
            "description": "A unique corporate identifier assigned to the client"
          },
          {
            "name": "compId",
            "in": "path",
            "required": true,
            "type": "string",
            "description": "A unique company identifier assigned to the client"
          },
          {
            "name": "programId",
            "in": "path",
            "required": true,
            "type": "string",
            "description": "A unique program identifier assigned to the client"
          }
        ],
        "responses": {
          "200": {
            "description": ""
          }
        },
        "x-unitTests": [],
        "x-operation-settings": {
          "CollectParameters": false,
          "AllowDynamicQueryParameters": false,
          "AllowDynamicFormParameters": false,
          "IsMultiContentStreaming": false
        }
      }
    },
    "/zeta/hasUser": {
      "get": {
        "tags": [
					"Disbursement APIs"
				],
        "summary": "hasUserCheck a Beneficiary or User Existence",
        "operationId": "ZetaHasUserGet",
        "produces": [
          "application/json"
        ],
        "parameters": [         
		  {
            "name": "identityType",
            "in": "query",
            "required": true,
            "type": "string",
            "description": "PHONE_NUMBER or EMAIL"
          },
          {
            "name": "identity",
            "in": "query",
            "required": true,
            "type": "string",
            "description": "Phone number or email of the user"
          }
        ],
        "responses": {
          "200": {
            "description": ""
          }
        },
        "x-unitTests": [
          {
            "request": {
              "method": "GET",
              "uri": "/zeta/hasUser?identity_type=EMAIL&identity=test@zeta.in"
            },
            "expectedResponse": {
              "x-allowExtraHeaders": true,
              "x-bodyMatchMode": "NONE",
              "x-arrayOrderedMatching": false,
              "x-arrayCheckCount": false,
              "x-matchResponseSchema": true,
              "headers": {}
            },
            "x-testShouldPass": true,
            "x-testEnabled": true,
            "x-testName": "hasUser"
          }
        ],
        "x-operation-settings": {
          "CollectParameters": false,
          "AllowDynamicQueryParameters": false,
          "AllowDynamicFormParameters": false,
          "IsMultiContentStreaming": false
        }
      }
    }
  },
  "definitions": {
    "DisbursementRequest": {
      "title": "disbursementRequest",
      "example": {
        "requestID": "requestId-test-4-9",
        "type": "to_wallet",
        "value": {
          "amount": in paise,
          "currency": "INR"
        },
        "beneficiary": {
          "id": "beneficiary ID",
          "name": "beneficiary name",
          "email": "beneficiary email",
          "phoneNumber": "beneficiary phone number",
          "pan": "beneficiary pan number",
          "aadhar": "beneficiary aadhar number"
        },
        "description": "test payout",
        "scheduledAt": "now",
        "attributes": {
          "age": 10
        }
      },
      "type": "object",
      "properties": {
        "requestID": {
          "description": "",
          "example": "requestId-test-4-9",
          "type": "string"
        },
        "type": {
          "description": "",
          "example": "to_wallet",
          "type": "string"
        },
        "value": {
          "$ref": "#/definitions/Value"
        },
        "beneficiary": {
          "$ref": "#/definitions/Beneficiary"
        },
        "description": {
          "description": "",
          "example": "test payout",
          "type": "string"
        },
        "scheduledAt": {
          "description": "",
          "example": "now",
          "type": "string"
        },
        "attributes": {
          "$ref": "#/definitions/Attributes"
        }
      },
      "required": [
        "requestID",
        "type",
        "value",
        "beneficiary",
        "description",
        "scheduledAt",
        "attributes"
      ]
    },
    "Value": {
      "title": "Value",
      "example": {
        "amount": 10000,
        "currency": "INR"
      },
      "type": "object",
      "properties": {
        "amount": {
          "description": "",
          "example": 10000,
          "type": "integer",
          "format": "int32"
        },
        "currency": {
          "description": "",
          "example": "INR",
          "type": "string"
        }
      },
      "required": [
        "amount",
        "currency"
      ]
    },
    "Beneficiary": {
      "title": "Beneficiary",
      "example": {
        "id": "suraj-13beneficiary ID",
        "name": "Surajbeneficiary Tripathiname",
        "email": "",
        "phoneNumber": "8886520012beneficiary phone number",
        "pan": "AMPPT87N00beneficiary name PAN number",
        "aadhar": "beneficiary aadhar number"
      },
      "type": "object",
      "properties": {
        "id": {
          "description": "",
          "example": "surajtest-13",
          "type": "string"
        },
        "name": {
          "description": "",
          "example": "SurajVirat TripathiKohli",
          "type": "string"
        },
        "email": {
          "description": "",
          "type": "string"
        },
        "phoneNumber": {
          "description": "",
          "example": "88865200129999999999",
          "type": "string"
        },
        "pan": {
          "description": "",
          "example": "AMPPT87N00IPTPT88N87",
          "type": "string"
        },
        "aadhar": {
          "description": "",
          "type": "string"
        }
      },
      "required": [
        "id",
        "name",
        "email",
        "phoneNumber",
        "pan",
        "aadhar"
      ]
    },
    "Attributes": {
      "title": "Attributes",
      "example": {
        "age": 10
      },
      "type": "object",
      "properties": {
        "age": {
          "description": "",
          "example": 10,
          "type": "integer",
          "format": "int32"
        }
      },
      "required": [
        "age"
      ]
    }
  }
}





Panel


Div
classalignLeftIcon mobileToc iframe__layout__sidepane

On this page:

Table of Contents