Create Transaction
PUT/transaction/create-transaction
This endpoint allows authenticated users to create a transaction by submitting a request with the necessary details. The endpoint ensures that the user's access level permits transaction creation and enforces a rate limit of 30 requests. It checks that the number of products is within the allowed range (1-20) and calculates the total transaction amount, applying a 20% charge for escrow transactions. It also verifies that the total amount does not exceed a specific threshold (2,000,000). The user's IP address and browser information are logged, and the transaction details are saved with relevant metadata, including a unique order ID and the associated account state. If any conditions are not met, appropriate error messages are returned.
Request
Responses
- 200
- 400
- 401
- 403
- 404
- 422
- 500
The request was successful.
The request was invalid or malformed.
The user is not authorized to make this request.
The user does not have permission to access this resource.
The requested resource could not be found.
Validation Error
An unexpected internal server error occurred.