Object

Overview of the transfer object.

Shown below is a sample transfer object

{
  "id": "tr_pE33t80XLanGc14F017rRQi6w",
  "object": "transfer",
  "type": "vpa",
  "amount": 1,
  "debit_account_id": "va_3Zk64YDxnBtyvkzWoIVUOIWHu",
  "beneficiary_id": "vab_g4U5sHgLA2awuLUBoXvhTp8TR",
  "status": "success",
  "bank_reference_number": "214568825005",
  "currency_code": "inr",
  "message": "Transaction success",
  "payment_mode": "upi",
  "payment_remark": "Lego Death Star",
  "paid_to": "ganga-reddy@example",
  "beneficiary_name": "Sunil Reddy",
  "beneficiary_ifsc": "HDFC0000123",
  "otp_attempts": 0,
  "metadata": {
    "key_1": "DD",
    "key_2": "XOF"
  },
  "merchant_reference_id": "1000057",
  "transacted_at": 1653472639,
  "is_sandbox": false,
  "created_at": 1653472637
}
{
  "id": "tr_RR66dJIg95bhPP7YUHA6hBMVx",
  "object": "transfer",
  "type": "account_number",
  "amount": 1,
  "debit_account_id": "va_0S2gghUY2wZqayy4Mw95M8zzQ",
  "beneficiary_id": "vab_vHLdkuH3juBnumAyVaXTLSvwa",
  "status": "pending",
  "bank_reference_number": "N179221309296093",
  "bank_error_code": "sent_to_beneficiary",
  "currency_code": "inr",
  "reason_for_error": "IMPS: Transaction accepted by NPCI but no response received from beneficiary bank within the time limit set NEFT: Transaction has been accepted by RBI but the acknowledgement has not yet been received",
  "error_type": "business",
  "recommended_action": "IMPS: Check status after 1 hour. Transaction status expected to clear to COMPLETED/ FAILED after 2 working days in most cases. NEFT: Check status after 3 hours in NEFT working window. If transaction has been posted after NEFT Cut off time then check the status on next working day",
  "payment_mode": "neft",
  "payment_remark": "Lego Death Star",
  "paid_to": "5010001010101",
  "beneficiary_name": "Sunil Reddy",
  "beneficiary_ifsc": "HDFC0000123",
  "otp_attempts": 0,
  "metadata": {
    "key_1": "DD",
    "key_2": "XOF"
  },
  "merchant_reference_id": "1000122",
  "transacted_at": 1656412283,
  "is_sandbox": false,
  "created_at": 1656412281
}
{
  "id": "tr_XXiQhVSG22ls9tmYZoYIOlRQO",
  "object": "transfer",
  "type": "account_number",
  "amount": 1,
  "debit_account_id": "va_3Zk64YDxnBtyvkzWoIVUOIWHu",
  "beneficiary_id": "vab_a77BIN1KID2HDctgI38j9r3SM",
  "status": "failed",
  "bank_reference_number": "N145221230932867",
  "bank_error_code": "returned_from_beneficiary",
  "currency_code": "inr",
  "reason_for_error": "Transaction accepted by RBI but beneficiary bank rejected it",
  "error_type": "business",
  "recommended_action": "Check if the bank account number & ifsc code is valid",
  "payment_mode": "neft",
  "payment_remark": "Lego Death Star",
  "paid_to": "54055602160",
  "beneficiary_name": "Sunil Reddy",
  "beneficiary_ifsc": "HDFC0000123",
  "otp_attempts": 0,
  "metadata": {
    "key_1": "DD",
    "key_2": "XOF"
  },
  "merchant_reference_id": "1000065",
  "transacted_at": 1653477148,
  "is_sandbox": false,
  "created_at": 1653473541
}

The table below lists the various parameters in the transfer object.

ParameterTypeDescription
idstringUnique identifier of the transaction in the ZWITCH database.

Example: tr_3lgMWu7HruSQ3LX750GSXHQ5K
objectstringAPI object that is returned.

Possible value: transfer
typestringThe account type to which the transfer was made.

Possible values:
  • account_number
  • vpa
  • wallet
amountfloatThe amount you want to transfer in rupees.

Example: 369.71
debit_account_idstringThe account_id from which money should be debited.

Example: va_Q6USeYXbx38cKa3NbBpoHDViW
beneficiary_idstringReturned only if type is:
  • account_number
  • vpa
The beneficiary_id to which money should be credited.

Example: vab_ZPdnNajZkGlu5xrNDVjZNrb3d
credit_account_idstringReturned only if type is wallet.

Unique identifier of the ZWITCH virtual account to which money should be credited.

Example: va_MDOShxKdcWpm7vEr2yDVb88EP
statusstringThe status of the transfer.

Possible values:
  • initiated: Only when async=true. The transfer request was successfully created and added to the transfer queue. Money has been debited from the debit account, but the transfer has not yet been sent to the bank for processing.
  • pending: The transfer request is successful, but money has not been credited to the beneficiary.
  • success: The transfer has been successfully processed and money has been credited to the beneficiary.
  • failed: The transfer could not be processed. This could be because of multiple reasons such as the debit account not having sufficient balance for the transfer.
bank_reference_numberstringUnique reference number for the transfer sent by the bank.

Example: 470596411087386
currency_codestringISO code of the currency in which you want to make the transfer.

Currently, only inr is allowed.

Example: inr
reason_for_errorstringReturned only if the status is.
  • pending
  • failed
Reason the transfer failed.

Example: Problem with beneficiary account
error_typestringReturned only if the status is.
  • pending
  • failed
Type of error that occured.

Example: business
messagestringThis can either be:
  • Success message
  • Reason the transfer failed
  • Reason the transfer pending
Example: ifsc code is invalid or Transaction success
recommended_actionstringReturned only if the status is:
  • pending
  • failed
Suggestion to rectify the error before retrying the transfer.

Example: Check if the bank account number & ifsc code is valid
payment_modestringReturned only if type is:
  • account_number
  • vpa
Mode used to transfer money.

Possible values:
  • neft
  • imps
  • rtgs
  • upi
  • ift (only when transferring money between SMB savings accounts)
payment_remarkstringRemark for the transfer. This is shown in the bank statement.

  • Only alphabets, numbers, and spaces are allowed.
  • Minimum: 1 character.
  • Maximum: 40 characters.
Example: Zwitch for the win.
paid_tostringAccount number or VPA handle to which money was transfered.

Example: 3636365771802098 or zwch1758862752@yesbank
beneficiary_namestringBeneficiary's name.

Example: Sunil Reddy
beneficiary_ifscstringReturned only if type is: account_number

Beneficiary bank IFSC.

Example: HDFC0000123
otp_attemptsintegerAlways 0 when transferring money from virtual accounts.
merchant_reference_idstringUnique identifier entered when creating the transfer.

  • Only alphabets and numbers are allowed.
  • Minimum: 7 characters.
  • Maximum: 40 characters.
Example: 1409614085
metadataobjectObject of key-value pair that can be used to store additional information about the entity.
  • Each pair cannot exceed 256 characters.
  • Maximum 5 key-value pairs.
Example: "key_1": "Zwitch to the moon.”
transacted_atintegerUnix timestamp when the transfer request was successfully processed.

Example: 1640179951
created_atintegerUnix timestamp when the create transfer request was received by ZWITCH.

Example: 1640179951
is_sandboxbooleanMode in which the API was triggered.

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