Callback
Request Completion via Callback
When an action is completed, the results are sent to a callback URL that you provide.
Hash Generation (Optional)
If you prefer to use a hash for added security, the hash algorithm used is SHA256.
Example Data
Here is an example of the data that might be before hashing:
Hash Generation Process
Salt: Your API key provided by us.
Example API key:
e0d26036720740f4a04452ec7370ffb4
Data to Hash: Concatenate the data with the salt.
Example:
Generated Hash:
Hash:
5c19ac3344d0e42bb5774e20310d76b47d58fd9881d317f30eb5e4d695f6013d
The codes given below calculate the SHA256 hash value of the transaction object.
We Use Unicode Escape in JSON Serialization
Why Use Unicode Escape?
Security: Ensures safe data processing across different systems, crucial for maintaining data integrity in payment systems.
Compatibility: Guarantees consistent interpretation of JSON data across all systems and applications, improving integration with payment gateways and third-party services.
Error Reduction: Reduces potential character encoding errors.
Key Point: In our payment systems and multi-system integrations, we use Unicode escape during serialization for better security and compatibility.
Resulting JSON
Here is the resulting JSON that includes the generated hash:
Send a callback
POST
https://yourdomain.com/your-path
Headers
Content-Type
application/json
x-api-key
<x-api-key>
Body
id
integer
Transaction Id
username
string
The user's unique username. It should be dynamically generated or retrieved from your user database.
firstName
string
The user's first name.
lastName
string
The user's last name.
amount
decimal
The deposit amount in the smallest currency unit (e.g., cents, pence).
currency
string
The currency of the deposit amount (e.g., TRY, USD, EUR, GBP).
type
string
"Deposit" or "Withdrawal"
status
string
"Confirm" or "Reject"
message
string
Optional field for additional information about the transaction.
reference
string
A unique identifier for the transaction, typically a UUID or your unique transaction Id.
hash
string
Security measure to ensure data integrity and authenticity.
Response
For the callback, you can return a response as shown below or simply return a 204 No Content status. It is preferred to use appropriate HTTP status codes. The success of the result is determined based on the HTTP status codes.
Last updated