Withdrawal
Last updated
Last updated
To initiate a withdrawal for a user, a POST request must be sent to the following endpoint. The request body should be JSON formatted with the following parameters:
POST
/api/v1/paymentmethod/withdrawal
Headers
Name | Value |
---|---|
Body
Name | Type | Description |
---|---|---|
Response
Gather the necessary user details and the desired withdrawal amount.
Create the JSON payload with the correct user and transaction details.
Make the POST request to the designated endpoint with the JSON body.
Upon receiving the response, direct the user to the paymentPageUrl to carry out the withdrawal operation.
Note: Validate the paymentPageUrl before redirecting the user to ensure its authenticity and security.
If a user sends a new request before their previous request is completed, they will receive a "pending transaction" warning. To avoid this warning, save the paymentPageUrl
information for the ongoing transaction. Keep this URL until the user completes their transaction. If the user tries to make another request before the first one is completed, instead of creating a new request, redirect them to the saved paymentPageUrl
.
Content-Type
application/json
x-api-key
<x-api-key>
username
string
The user's unique username. This should be dynamically generated or retrieved from your database.
firstName
string
The user's given 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).
reference
string
A unique identifier for the transaction, typically a UUID or your unique transaction Id.
paymentMethod
integer
The identifier number for the selected payment method.
Make a withdrawal request.
Withdrawal successful.