Deposit
Last updated
Last updated
To initiate a deposit for a user, you need to send a POST request to the following endpoint. The request body must be in JSON format and include the following parameters:
POST
/api/v1/paymentmethod/deposit
Headers
Name | Value |
---|---|
Body
Name | Type | Description |
---|---|---|
Response
Collect the necessary user information and the deposit amount.
Construct the JSON request payload with the appropriate values.
Send the POST request with the payload to the provided endpoint.
On receipt of the response, extract the paymentPageUrl
and redirect the user to this URL to proceed with the payment.
Note: Always validate the paymentPageUrl
before redirecting the user to ensure it is a valid and secure link.
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. 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).
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 deposit request.
Deposit successful.