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 messageError codeDescription
invalid_transactionIdn/atransactionId passed to the sdk is incorrect
transaction_in_processn/aanother transaction is in process, must wait for it to complete
invalid_gatewayn/agateway_name passed in the sdk initialization is invalid or not registered
invalid_jwtn/aJWT parameter for SDK initialization is invalid. Make sure the payload is as suggested & JWT is signed with valid shared secret
invalid_elementorselectorn/acould not find HTMLElement to insert Iframe
invalid_user_datan/asmallcaseAuthToken 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 intents

Error messageError codeDescription
user_mismatch1001For 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_expired1005Transaction 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_broker1006[Deprecated] user could not find his broker in the list of brokers shown
no_broker1007User could not find his broker in the available list & opted to signup for a new broking account
no_broker1008User selected a broker that did not support the transaction intent
user_cancelled1010user has closed the broker chooser popup
user_cancelled1011user has closed the order journey after selecting the broker, but before successful login
user_cancelled1012When the user completes broker login to view the order popup and abandons the order journey, this error is returned
no_compatible_browser1014When user has no browsers installed on their device
trading_not_enabled1030user's account is not enabled to transact at NSE
internal_error2000Something went wrong with our APIs/SDK. We do take note of these errors cautiously and look in to them on priority
transaction_expired3001TransactionId passed in the triggerTransaction method is used or expired

Single stock or basket order errors

These errors are applicable only when a user is placing single (or multiple) stock orders.

Error messageError codeDescription
market_closed4004broker is not accepting orders

smallcase order errors

These errors are applicable only when a user is placing smallcase orders with the broker.

Error messageError codeDescription
no_order1020smallcase is already up to date as suggested by the rebalance. rebalance was ignored
smallcase_archived1013smallcase has been deleted post archival
already_subscribed4000user has already subscribed to the smallcase
market_closed4005particular smallcase order type cannot be executed in after-market hours
order_pending4006last order for the smallcase by the user is still in pending status
invalid_scida smallcase could not be found with given information
invalid_iscidcannot 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 messageError codeDescription
consent_denied1003user denies consent for holdings import. This step comes once in user lifetime for all broker
webhook_unreachable3003webhook 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 messageError codeDescription
intent_not_enabled_for_broker3000If the user's connected broker is not available to show the order list page.