Integration Docs

Comprehensive guide and documentation to help you start working with smallcase Gateway

Get Started

Web Integration


Adding gateway javascript sdk in the web app & initialization
Gateway provides a JS sdk to be included in your client side code. The sdk is compatible with all major browsers and JS libraries/frameworks

To get started, include sdk’s JS file before your main webapp

<script src=""

Once the sdk has loaded, you will have access to scDK class in the webapp’s JS global scope
An instance of scDK class scGateway can be initialized to access client side sdk methods

const scGateway = new scDK({
  gateway: <gateway_name>,
  smallcaseAuthToken: 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJndWVzdCI6dHJ1ZX0.4-iEdgi3W5_xy7Svj4Sj-FWAe5qMrW3u371FnbjJxQ8',
  config: {
    amo: true

To enable after market orders(AMO) by passing a boolean value to the amo key in the config object in the initialization

Trigger transaction

Use triggerTransaction method to start the gateway transaction
It accepts two parameters -

  • transactionId
    Eg: TRX_652377470a134a80ac6c56d19ef3416c
  • brokers
    array of supported brokers, use aliceblue, axis, edel, fivepaisa, `hdfc', 'iifl', 'kite', 'trustline'
    All brokers are shown if the key is missing/empty
  transactionId: <transactionId>
.then(res => res)
.catch(err => err)

Lead Gen

Trigger the signup method to start the leadgen signup flow.

It accepts an optional parameter -

  • userDetails can have one or more of the following string keys containing user details:
    • name - Full name
    • email - Email address
    • contact - Contact number
    • pinCode - Pin code

The keys inside the userDetails object are optional.

And for all relevant keys passed to the signup method, gateway will pre-populated relevant user data in the signup flow, ensuring a smooth user experience

Example usage

 name: 'Chuck Noris',
 email: '[email protected]',
 contact: '9876543210',
 pinCode: '123456',
.then(() => { console.log("signup flow has now ended") });

Note: In order to trigger signup flow, an instance of scDK class scGateway must be initialized.

Updated 13 days ago

Web Integration

Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.