Object

Overview of the Token API object.

Shown below is a sample Generate Token API objects.

{
  "id": "ses_S4tADoz44XfswkQlstEHbTJK6",
  "type": "onboarding",
  "session": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzZXNzaW9uX2lkIjoic2VzX1M0dEFEb3o0NFhmc3drUWxzdEVIYlRKSzYiLCJ1c2VyX2FjY291bnRzX3BpZCI6InVhY191NlJzYWJhMkJJYlZuMWJmNzBzU3BmaCIsImN1c3RvbWVyIjp7ImlkIjoiIn0sImF1dGhfaXNfc2FuZGJveCI6MSwidHlwZSI6Im9uYm9hcmRpbmciLCJhdWQiOiJ6d2l0Y2hfc2RrIiwiZXhwIjoxNjY4ODYxMTE0LCJqdGkiOiI5OWU1M2Q0NmUzMjY0OGE2ODdiNDk3ODIzNDQ1MWRhYSIsImlhdCI6MTY2ODc3NDcxNCwiaXNzIjoiWndpdGNoIEdvIiwibmJmIjoxNjY4Nzc0NzE0fQ.w3NrYBJ5d-i6yunPDK6nyE7iQOX8_Fe34XFhh1k0RVE",
  "request_details": {
    "name": "Anil Reddy",
    "email": "[email protected]",
    "pan": "AAAPA0000A",
    "mobile_number": "9876543210",
    "kyc": {
      "contact_person": "Anil Reddy",
      "business_category": "arms_dealer_or_antique_dealer_or_art_dealer",
      "date_of_incorporation": "2022-11-22"
    }
  },
  "created_at": 1668774714,
  "is_sandbox": true
}
{
  "id": "ses_a90aufTVbe5Z8SZurhTKEc0nF",
  "type": "customer",
  "session": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzZXNzaW9uX2lkIjoic2VzX2E5MGF1ZlRWYmU1WjhTWnVyaFRLRWMwbkYiLCJ1c2VyX2FjY291bnRzX3BpZCI6InVhY191NlJzYWJhMkJJYlZuMWJmNzBzU3BmaCIsImN1c3RvbWVyIjp7ImlkIjoiY3VzX2Y1UmdhNmEySEliVm4xYmY3MHd0ZjIzIn0sImF1dGhfaXNfc2FuZGJveCI6MSwidHlwZSI6ImN1c3RvbWVyIiwiYXVkIjoiendpdGNoX3NkayIsImV4cCI6MTY2ODg2MTA2MCwianRpIjoiOGZjN2FhMWEyMmE1NDBkOTllOTYyMWE0YWQxYWQzODQiLCJpYXQiOjE2Njg3NzQ2NjAsImlzcyI6Ilp3aXRjaCBHbyIsIm5iZiI6MTY2ODc3NDY2MH0.vz26C3WuH_AAN7xsdJSFtEHPs-kl2AB0qE-l4zafeqQ",
  "mobile_number": "9876543210",
  "request_details": {
    "account_id": "sa_rMt2zuZMyWsgCUw2os3b5GIDQ",
    "name": "Anil Reddy",
    "email": "[email protected]",
    "pan": "AAAPA0000A",
    "mobile_number": "9876543210",
    "kyc": {
      "business_category": "test",
      "date_of_incorporation": "2022-11-22"
    }
  },
  "created_at": 1668774660,
  "is_sandbox": true
}
{
  "id": "ses_dl5eyL4b9JuQ0vQrrhER7J29c",
  "type": "transfer",
  "session": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzZXNzaW9uX2lkIjoic2VzX2RsNWV5TDRiOUp1UTB2UXJyaEVSN0oyOWMiLCJ1c2VyX2FjY291bnRzX3BpZCI6InVhY191NlJzYWJhMkJJYlZuMWJmNzBzU3BmaCIsImN1c3RvbWVyIjp7ImlkIjoiY3VzX2Y1UmdhNmEySEliVm4xYmY3MHd0ZjIzIn0sImF1dGhfaXNfc2FuZGJveCI6MSwidHlwZSI6InRyYW5zZmVyIiwiYXVkIjoiendpdGNoX3NkayIsImV4cCI6MTY2NTM5NDI0OCwianRpIjoiZGZmMjZiM2Q4MzlhNDZjZjgxYWI5ZTdlNGZjNDk3OTMiLCJpYXQiOjE2NjUzMDc4NDgsImlzcyI6Ilp3aXRjaCBHbyIsIm5iZiI6MTY2NTMwNzg0OH0.EZVC2yO9IGlkYZSH4JMlwOwCtVfm03n2K1YulAQovRY",
  "mobile_number": "9876543210",
  "request_details": {
    "debit_account_id": "sa_rMt2zuZMyWsgCUw2os3b5GIDQ",
    "beneficiary_id": "sab_fSMZ1qe620zDoPiL5wIRaAn21",
    "merchant_reference_id": "1234567",
    "amount": "369",
    "transfer_id": "tr_rr8OkQ8yvWLVTO5yhU1JaxkJg",
    "virtual_account_id": "va_rMt2zuZMyWsgCUw2os3b5GIDQ",
    "bulk_reference_id": "shjkdkjhdkhfkshdkfhskfhsf"
  },
  "created_at": 1665307848,
  "is_sandbox": true
}

The table below lists the various parameters in the Generate Token API response.

ParameterTypeDescription
idstringUnique identifier of the token generated in the ZWITCH database.

Example: ses_3CMgHVQVhcyelyOPRoEUWvuir

Supported characters:
  • A-Z
  • a-z
  • 0-9
  • _
typestringType of token generated.

Possible values:
  • onboarding
  • customer
  • transfer
sessionstringToken generated.

Example: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzZXNzaW9uX2lkIjoic2VzXzNDTWdIVlFWaGN5ZWx5T1BSb0VVV3Z1aXIiLCJ1c2VyX2FjY291bnRzX3BpZCI6InVhX0VjSkVnQWxPZ3hmbEJiQkRvYmg4VjZCMWoiLCJjdXN0b21lciI6eyJpZCI6ImN1c19Oa2pTa3J4VTJoN0U5QmMxdWNYMzUxMXVQIn0sImF1dGhfaXNfc2FuZGJveCI6MSwidHlwZSI6InRyYW5zZmVycyIsImF1ZCI6Inp3aXRjaF9zZGsiLCJleHAiOjE2NTIwOTU0ODQsImp0aSI6IjI2NDk5ZGVmMDdhYTQ5NTNiZTYwOGRkMThkNjA4MDZmIiwiaWF0IjoxNjUyMDkxODg0LCJpc3MiOiJad2l0Y2ggR28iLCJuYmYiOjE2NTIwOTE4ODR9.5eimAgQLl-2dfhzZTayOcYL2vz6w35iqssWDvra2Zsw
customer_idstringReturned only when:
  • Generating customer and transfers tokens.
  • The parameter is passed in the request.


Unique identifier of the customer in the ZWITCH database.

Example: cus_NkjSkrxU2h7E9Bc1ucX3511uP
mobile_numberstringReturned only when:
  • Generating customer and transfers tokens.
  • The parameter is passed in the request.


Customer's mobile number.

Has to be 10 digits.

Example: 9876543210

Supported Characters:
  • 0-9
  • request_detailsobjectDetails passed in this object are prefilled in the element when initializing the element.

    Learn more about the request_details child object.
    created_atintegerUnix timestamp when the create token request was successfully processed.

    Example: 1640179951
    is_sandboxintegerThe mode in which the API was triggered.

    Possible values:
    • true: API was triggered in sandbox mode
    • false: API was triggered in live mode

    [Child Object] Request Details Object

    The table below lists the various parameters in the request_details child object. This object is part of the Generate Token API response.

    ParameterTypeDescription
    namestringonboarding token only.

    Applicant's name.

    The applicant can either be an individual or a business.

    Maximum 70 characters.

    Example: Anil Reddy

    Supported characters:
    • A-Z
    • a-z
    • 0-9
    • .
    • /
    • \
    • -
    • _
    • ,
    • (
    • )
    • '
    emailstringonboarding token only.

    Applicant's email address.

    The applicant can either be an individual or a business.

    Example: [email protected]
    panstringonboarding token only.

    Applicant's PAN.

    The applicant can either be an individual or a business.

    Example: ABCDE0000A
    mobile_numberstringonboarding token only.

    Applicant's mobile number.

    The applicant can either be an individual or a business.

    Has to be 10 digits.

    Example: 9876543210

    Supported Characters:
    • 0-9
  • kycobjectonboarding token only.

    Object to pass the applicant's KYC details.
    account_idstringcustomer token only.

    Unique identifier of the account using which the action is to be performed.

    Example: sa_sbmblL76KQE4NFlfsYqAdDz3FzJl

    Supported characters:
    • A-Z
    • a-z
    • 0-9
    • _
    debit_account_idstringtransfer token only.

    The unique identifier of the account from which money should be debited.

    Example: sa_Q6USeYXbx38cKa3NbBpoHDViW

    Supported characters:
    • A-Z
    • a-z
    • 0-9
    • _
    beneficiary_idstringtransfer token only.

    The unique identifier of the beneficiary to whom the money should be credited.

    Example: sab_ZPdnNajZkGlu5xrNDVjZNrb3d

    Supported characters:
    • A-Z
    • a-z
    • 0-9
    • _
    amountfloattransfer token only.

    The amount you want to transfer in rupees.

    Example: 369.71
    transfer_idstringtransfer token only.

    Unique identifier of the transfer in the ZWITCH database.

    Example: tr_I0c4sIyfXu8amW4Gs3ioPe1Nq

    Supported characters:
    • A-Z
    • a-z
    • 0-9
    • _
    virtual_account_idstringtransfer token only.

    Unique identifier of the virtual account in the ZWITCH database.

    Example: va_2BNgFqGdz0AqUDtKMgZgRfjG6

    Supported characters:
    • A-Z
    • a-z
    • 0-9
    • _
    bulk_reference_idstringtransfer token only.

    Unique identifier of the bulk transfer in the ZWITCH database.

    Example: trb_I0c4sIyfXu8amW4Gs3ioPe1Nq

    [Child Object] KYC Object

    The table below lists the various parameters in the kyc child object. This object is part of the request_details child object.

    ParameterTypeDescription
    contact_personstringonboarding token only.

    Used only when creating a new current account.

    Contact person's name for the business.

    Maximum 70 characters.

    Example: Anil Reddy

    Supported characters:
    • A-Z
    • a-z
    • 0-9
    • .
    • /
    • \
    • -
    • _
    • ,
    • (
    • )
    • '
    business_categorystringonboarding token only.

    Used only when creating a new current account.

    Business category for the current account.

    Use the Business Categories API to get a list of accepted values.

    Example: arms_dealer_or_antique_dealer_or_art_dealer
    date_of_incorporationstringonboarding token only.

    Used only when creating a new current account.

    Date the business was registered.

    Accepted format: YYYY-MM-DD

    Example: 2021-12-31