Payment Method
Last updated
Last updated
To retrieve the available payment methods, you need to make a GET request to the following endpoint.
The API will return a JSON array of available payment methods. Each payment method object contains the following attributes:
paymentMethod
: A unique identifier for the payment method.
paymentMethodName
: The name of the payment method (e.g., "Bank Transfer", "Cryptocurrency", "Credit Card"). This should be used to display the payment method name in your application.
supportedCurrencies
: An array of supported currencies for this payment method.
acceptDeposit
: A boolean indicating whether deposits are accepted with this payment method.
acceptWithdrawal
: A boolean indicating whether withdrawals are accepted with this payment method.
logoUrl
: The URL to the payment method's logo. Use this to retrieve the logo image for display in your application.
GET
/api/v3/paymentmethod
Headers
Name | Value |
---|---|
Response
Parse the JSON response to get an array of payment methods.
For each payment method, check the acceptDeposit
and acceptWithdrawal
attributes to determine if they support deposit and withdrawal operations, respectively.
To display the payment method's name, use the paymentMethodName
attribute in your application's UI.
If you wish to display the payment method's logo, retrieve the image from the logoUrl
and ensure it is correctly displayed next to the payment method name.
Note: The logoUrl
must point to a valid image file, and your application should handle cases where the image may not be available or the URL is incorrect.
To maintain accuracy and reflect any changes in available payment methods, it is essential to dynamically retrieve the payment methods from the API for each deposit and withdrawal request. This means that the payment methods should not be hardcoded or stored permanently in the frontend application. Instead, they should be fetched anew each time the user initiates a deposit or withdrawal.
API Call on Every Transaction:
Ensure that an API call is made to retrieve the latest payment methods data every time a user starts a deposit or withdrawal process.
Avoid Persistent Storage:
Do not store the payment methods data permanently in the state or any local storage after fetching. This prevents the application from displaying outdated information.
Real-time Updates:
By fetching the payment methods dynamically, you ensure that any updates, additions, or removals of payment methods on the backend are immediately reflected to the user.
Deposit Process:
When the user selects the option to make a deposit, initiate an API call to fetch the current list of payment methods that support deposits.
Display the fetched payment methods to the user for selection.
Withdrawal Process:
Similarly, when the user opts to withdraw funds, initiate an API call to retrieve the latest payment methods available for withdrawals.
Present these options to the user for selection.
By following these guidelines, you can ensure that the users always see the most up-to-date and accurate payment methods, enhancing the reliability and user experience of the application.
Content-Type
application/json
x-api-key
<x-api-key>
Retrieve the available payment methods.
A JSON array of available payment methods.