Widgets

Integrate Hyperswitch SDK using individual payment widgets for granular control over your payment flow.

Requirements

1. Setup the server

$ npm install @juspay-tech/hyperswitch-node

Follow the Server Setup section.

2. Build checkout page on your app

2.1 Add the Buildscript Classpath

To start integrating the Hyperswitch SDK, add the following classpath to the buildscript block of your project-level build.gradle file:

buildscript {
    repositories {
        mavenCentral()
    }
    dependencies {
        classpath "io.hyperswitch:hyperswitch-gradle-plugin:"
    }
}

2.1 Add the Buildscript Classpath

Add the following plugin to the plugins block of your app-level build.gradle file:

plugins {
    // Apply Hyperswitch Plugin
    id 'io.hyperswitch.plugin'
}

2.3 Implement the HyperInterface

Next, implement the HyperInterface in your Activity. This involves extending FragmentActivity and implementing the HyperInterface:

class WidgetActivity : AppCompatActivity(), HyperInterface {
    // ...
}

2.5 Initialize Payment Configuration

Set up the SDK using your publishable key:

private fun initialiseSDK() {
    // Initialize Payment Configuration
    PaymentConfiguration.init(applicationContext, publishKey)
}

3. Implementation

Choose from list of available widgets to integrate:

Final Step

Congratulations! You have successfully integrated Hyperswitch widgets into your app. This approach gives you granular control over each payment method and allows for custom UI/UX design while leveraging Hyperswitch's payment processing capabilities.

Next step:

Setup Payment Methods

Last updated

Was this helpful?