Dictionaries
Payment states
| State | Final | Description |
|---|---|---|
| init | no | Request to API will initiate payments. |
| pending | no | User redirected to the Defexa Payments Checkout facility during payment processing period. |
| approved | yes | Successfully completed payment. |
| declined | yes | Unsuccessful payment. |
Payment API statuses
| API status | Description |
|---|---|
| 0 | created |
| 1 | accepted |
| 2 | declined |
| 3 | hold |
| 4 | refunded |
| 5 | refunding |
Support currencies
| Name | Network |
|---|---|
| DOGE | Doge |
| LTC | Litecoin |
| DASH | Dash |
| NEM | Nem |
| AVAX | Avalanche |
| BTC_CASH | Bitcoin Cash |
| BTC | Bitcoin |
| ETH | Ethereum |
| ALGO | Algorand |
| TON | Ton |
| TRX | Tron |
| MATIC_PLG | Polygon |
| SOL | Solana |
| EOS | EOS |
| BNB | BSC |
| USDT_ERC20 | Ethereum |
| USDT_BSC | BSC |
| USDC_ERC20 | Ethereum |
| USDT_TON | Ton |
| USDT_POL | Polygon |
| USDC_POL | Polygon |
| USDT_TRC20 | Tron |
The
namefield from this list is used for all API requests where the parametercurrencyis present.
Errors
| Code | Description |
|---|---|
| merchant_not_found | The current private key cannot identify the user. |
| order_number_already_exists | Repeating an order of already identified order number.**** |
| amount_less_than_balance | Payout cannot be completed due to insufficient funds. |
| [parameter] is missing | Absent or incorrect parameter value. |
| amount_less_than_minimum | Minimum payout amount has not been requested. |
| session_token is blank | Absent session_token value. |
| session_not_valid | Incorrect session_token. |
| otp_incorrect | Absent or incorrect OTP value. |
| Access is denied. IP [ip] is not in whitelist | IP is not in whitelist. |
| private_key error | Incorrect private key value. |
| payment_not_found | Payment not found for AML refund. |
| payment_completed | The payment is already in final status and no refund is possible. |
| aml_refund_started | The payment has pending refund. |
| transaction_cannot_be_returned | Payment is not refundable. |
| type_is_invalid | Incorrect type value. |
| settings_api_error | Settings not found for the transaction. |
| currency_not_supported | Currency is not supported for the transaction. |
| order_number_is_blank | Order number is blank. |
| The balance is less than the withdrawal amount | The balance is less than the withdrawal amount |
| from_wallet_not_found | Payment wallet not found. |
| payment_not_found | Invalid token or payment not found |
| missing_required_params | Missing required parameters |
Error response examples
If any method failed, the JSON response with status code 403/422 returned that specified the problem.
Return status 403 and JSON:
{
"success": false,
"result": 1,
"status": 403,
"errors": {
"list": [
{ "code": "merchant_not_found" }
]
}
}
{
"success": false,
"result": 1,
"status": 403,
"errors": [
{ "code": "amount_less_than_minimum" }
]
}
{
"success": false,
"result": 1,
"status": 403,
"errors": [
{ "code": "amount_less_than_balance" }
]
}