Enkash APIs
HomePayment GatewayPayoutsCreate Account
HomePayment GatewayPayoutsCreate Account
Login
  1. Payouts
  • Payouts Overview
  • Payouts Sign Up
  • Payout Methods
  • Payout API Response Codes
  • Payouts Integration Steps
  • Encrypting and Decrypting Payload
  • Payouts Status Codes
  • Get Authentication Token
    • Get Authentication Token
      POST
  • Beneficiary Apis
    • Create Beneficiary
      POST
    • Search Beneficiary
      POST
    • Delete Beneficiary
      DELETE
  • Transfer Apis
    • Create Payout
      POST
    • Search Payouts
      POST
    • Create Batch Payout
      POST
  • Payout Account Apis
    • Get Balance
      GET
    • Get Source Bank Account Details
      GET
    • Add Source Bank Account
      POST
    • Fetch Bank Statement
      POST
  • Webhook Data Apis
    • Get Webhook Data
      GET
    • Create Webhook Data
      POST
  1. Payouts

Encrypting and Decrypting Payload

Secure Data Transmission for Payout APIs#

For all Payout APIs, it is mandatory to:
1.
Encrypt the Request Payload: Ensure the payload is encrypted before sending it to the Enkash server for processing.
2.
Decrypt the Response Payload: Decrypt the encrypted response received from the server before consuming the data.
These security measures ensure that transaction requests and responses are securely transmitted, protecting sensitive information during communication.
You can refer to the examples below for guidance on encrypting and decrypting payloads.

Request and Response Format #

The request and response for all Payout APIs follow the format outlined below:

Request Format:#

{
    "request":"{ecrypted_request_string}"
}

Response Format:#

{
    "request":"{ecrypted_response_string}"
}

Encryption Logic#

To securely encrypt a request payload, follow the provided example, which demonstrates the required logic and implementation. Utilize this logic to ensure the payload is properly encrypted before sending it for processing.
Java
Javascript (NodeJs)
PHP
.Net
Python

Parameters:#

strToEncrypt: The payload string that you want to encrypt.
secretKey: The client's secret key used for encryption. This should be provided by the client.

Usage:#

Construct an object with the required fields.
Convert the request object to a JSON string.
Call the encrypt method with the JSON payload and the client's secret key.
It will return the encrypted payload as a Base64 encoded string.
NOTE
Ensure the secret key is securely stored and handled to prevent unauthorized access
The encryption logic utilizes AES encryption in ECB mode with PKCS5 padding for secure data encoding

Decryption Logic#

To decrypt a payload, use the provided methods to securely decode the encrypted response and retrieve the original data. Ensure decryption is implemented according to the specified logic for seamless processing.
Java
Javascript (NodeJs)
PHP
.Net
Python

Parameters:#

strToDecrypt: The encrypted payload string that you want to decrypt.
secretKey: The client's secret key used for decryption. This should match the secret key used for encryption.

Usage:#

Call the decrypt method with the encrypted payload string and the client's secret key
It will return the decrypted payload as a string
If the payload represents a JSON object, you can convert it back to an object
NOTE
Ensure the secret key is securely stored and handled to maintain data confidentiality and integrity
The decryption logic employs AES decryption in ECB mode with PKCS5 padding for accurate data retrieval
Modified at 2025-01-09 20:13:19
Previous
Payouts Integration Steps
Next
Payouts Status Codes
Built with