Transaction Errors
A transaction is initialised when a transactionId is passed to the triggerTransaction
method on the client side SDK. Transaction is complete when the user logs in with the broker account & confirms the intent.
However, if intent is not completed, SDK shares error message & code to identify the cause of failure.
Here is a list of error messages that you can handle on your application and show relevant communication to the users:
Initialisation Errors
Following errors appear while the client side SDK is being initialised on your application –
Error message | Error code | Description |
---|---|---|
invalid_transactionId | n/a | transactionId passed to the sdk is incorrect |
transaction_in_process | n/a | another transaction is in process, must wait for it to complete |
invalid_gateway | n/a | gateway_name passed in the sdk initialization is invalid or not registered |
invalid_jwt | n/a | JWT parameter for SDK initialization is invalid. Make sure the payload is as suggested & JWT is signed with valid shared secret |
invalid_elementorselector | n/a | could not find HTMLElement to insert Iframe |
invalid_user_data | n/a | smallcaseAuthToken is not provided or is invalid |
Once the SDK is setup, next step is to initiate a transaction using triggerTransaction
method provided by the SDK. Below is a list of errors that you can expect as the failure
response from triggerTransaction
method -
Generic errors
Following errors are applicable to all intent
s
Error message | Error code | Description |
---|---|---|
user_mismatch | 1001 | For a connected user's session on Gateway, user is expected to login with the mapped broker account only. If the user would login with another broker account, this error is returned |
transaction_expired | 1005 | Transaction session expired. Either the user did not complete the transaction within the expiration duration (15 minutes for orders, 45m for subscription, 5m for rest), or he tried refreshing the order window. |
no_broker | 1006 | [Deprecated] user could not find his broker in the list of brokers shown |
no_broker | 1007 | User could not find his broker in the available list & opted to signup for a new broking account |
no_broker | 1008 | User selected a broker that did not support the transaction intent |
user_cancelled | 1010 | user has closed the broker chooser popup |
user_cancelled | 1011 | user has closed the order journey after selecting the broker, but before successful login |
user_cancelled | 1012 | When the user completes broker login to view the order popup and abandons the order journey, this error is returned |
no_compatible_browser | 1014 | When user has no browsers installed on their device |
trading_not_enabled | 1030 | user's account is not enabled to transact at NSE |
internal_error | 2000 | Something went wrong with our APIs/SDK. We do take note of these errors cautiously and look in to them on priority |
transaction_expired | 3001 | TransactionId passed in the triggerTransaction method is used or expired |
init_sdk | 3004 | SDK was not initialised or has not finished initialisation |
Single stock or basket order errors
These errors are applicable only when a user is placing single (or multiple) stock orders.
Error message | Error code | Description |
---|---|---|
market_closed | 4004 | broker is not accepting orders |
smallcase order errors
These errors are applicable only when a user is placing smallcase orders with the broker.
Error message | Error code | Description |
---|---|---|
no_order | 1020 | smallcase is already up to date as suggested by the rebalance. rebalance was ignored |
smallcase_archived | 1013 | smallcase has been deleted post archival |
already_subscribed | 4000 | user has already subscribed to the smallcase |
market_closed | 4005 | particular smallcase order type cannot be executed in after-market hours |
order_pending | 4006 | last order for the smallcase by the user is still in pending status |
invalid_scid | a smallcase could not be found with given information | |
invalid_iscid | cannot find the invested smallcase |
Holdings import error
While importing broker holdings via Gateway, a user consent is required before holdings can be imported by the partner. In case user denies to give consent, consent_denied
error is thrown.
Error message | Error code | Description |
---|---|---|
consent_denied | 1003 | user denies consent for holdings import. This step comes once in user lifetime for all broker |
webhook_unreachable | 3003 | webhook could not be reached when trying to send holdings data |
Show orders error
These errors are applicable only when a user is viewing the order list page.
Error message | Error code | Description |
---|---|---|
intent_not_enabled_for_broker | 3000 | If the user's connected broker is not available to show the order list page. |
Updated 4 months ago