Pre-payment validation check
In case of exchange payment, the merchant can check a few validations before initiating a payment ex:
Insufficient Balance
The deposit address is not whitelisted
Password is required
etc
This API is NOT a core element of the payment flow. However, this helps to make a user-friendly payment solution.
The validation messages vary from exchange to exchange, but the API returns the same object with a different code that needs to handle at the merchant website.
Example:
OKcoin needs the deposit address for the whitelist, so this API checks whether or not the user has already whitelisted this address. In the API response, if the key "showWhitelistElement: true" means the deposit address is not whitelisted and merchant website should display the customer error.
A shopper's password is needed to withdraw the fund. If API returns a key "password: true," the shopper didn't provide the password, and the merchant's website should display a message to enter the password.
This API accepts the request payload in an encrypted format. The encryption algo is <algo_name> and encryption key is <client_secret>.
POST
/exchanges/payment-validate/{exchange_name}
The value of exchange_name are "coinbase/okcoin/kraken/gemini/binanceus"
Headers
Name | Type | Description |
---|---|---|
Authorization* | String | "Bearer" + shopper access token |
Content-Type | String | application/json |
Request Body
Name | Type | Description |
---|---|---|
data* | String | Encrypted string |
Last updated