Skip to main content

PhonePe Integration Guide

Estimated reading: 1 minutes

What does PhonePe appId refer in PhonePe payment gateway settings?

  • appId is provided by the PhonePe team. To obtain it, you need to create a package signature from your app and provide the package signature to the PhonePe team.

Obtain App Id

  1. Call the following method in the init() method of your project to print packageSignature in release mode with JKS to get the App ID from PhonePe:

     //*This Method is Needed to print packageSignature in release mode with jks to get Appid from Phone pe
    void getPackageSignatureForAndroid() {
    if (Platform.isAndroid) {
    PhonePePaymentSdk.getPackageSignatureForAndroid().then((packageSignature) {
    print('PhonePeSdk packageSignature $packageSignature');
    }).catchError((error) {
    return error;
    });
    }
    }
  2. Share this PhonePeSdk packageSignature with PhonePe Integration team via Email.

How to enable PhonePe as a payment gateway?

To enable PhonePe payment gateway:

  • Navigate to Settings → Payment Configuration.

  • Click on PhonePe tab.

  • Enable the switch for PhonePe Payment.

  • Add Gateway Name PhonePe.

  • Paste values

    • Merchant Id under the Merchant Id field.

    • App Id under the App Id field.

    • Salt Key under the Salt Key field.

    • Salt Index under the Salt Index field.

      PhonePe Admin Panel

Obtain Package Signature (PhonePe)

Follow the below steps:

  1. Navigate to the following path: path: handyman_user_flutter/lib/screens/auth/sign_in_screen.dart

  2. Add the following code in the initState() method:

       getPackageSignatureForAndroid();
  3. Run your project and go to the sign-in screen.

  4. Find the packageSignature from the logs.