Connect PhonePe
Connect PhonePe Payment Gateway with the school's own credentials or through JPRAXC, set up the SHA webhook and test it.
Use this guide to connect PhonePe Payment Gateway to the School ERP. The card is called PhonePe Payment Gateway. PhonePe can be connected in two ways, chosen in the Integration box:
- The school's own PhonePe merchant credentials: PhonePe issued the Client ID, secret and version to the school.
- Through JPRAXC as PhonePe technical service provider (TSP): the school is a PhonePe merchant with its own merchant ID, connected through JPRAXC. See Your own account or through JPRAXC.
Either way, PhonePe settles the fees to the school's own bank account.
Before you start#
- The school has a PhonePe merchant account (or, for the JPRAXC route, JPRAXC support has arranged it with PhonePe and you have the school's PhonePe merchant ID).
- You have the school administrator's login for the School ERP.
- Read Set up a gateway in Payment Configuration once.
PhonePe's screens change from time to time. If a menu below looks different, follow PhonePe's own documentation for Standard Checkout credentials and webhooks.
Option A: the school's own PhonePe credentials#
Get the credentials from PhonePe#
- Sign in to the PhonePe Business dashboard.
- Open the developer settings and find the Standard Checkout credentials for the test (UAT) environment. PhonePe may also send them to the registered e-mail during onboarding.
- Note the Client ID, the Client secret and the Client version. The client version is a number PhonePe issues with the client ID. Enter exactly what PhonePe gives you; do not assume it is 1.
Enter them in the School ERP#
- Open General Settings › Payment Configuration.
- Set Environment to Test / sandbox, then select Configure on the PhonePe Payment Gateway card.
- Check that Test environment is selected.
- In Integration, choose The school's own PhonePe merchant credentials.
- Paste Client ID, Client secret and Client version.
- In Webhook authentication, choose SHA username and password.
- Make up a Webhook username and a strong Webhook password. You will type the same pair in PhonePe.
- Leave Merchant server IP (partner integrations, optional) blank.
- Select Save settings, then Test connection.
Register the webhook in PhonePe#
- In the ERP, select Copy Webhook URL below the form.
- In the PhonePe dashboard, open the webhook page in the developer settings and create a webhook.
- Paste the address, choose SHA as the authentication type, and type the same username and password you entered in the ERP.
- Select the order completed, order failed, refund completed and refund failed events.
- Save it.
Option B: PhonePe through JPRAXC#
- Ask JPRAXC support to set up PhonePe through JPRAXC. Keep the school's PhonePe merchant ID ready.
- Open General Settings › Payment Configuration, set Environment to Test / sandbox and select Configure on the PhonePe Payment Gateway card.
- In Integration, choose Through JPRAXC as PhonePe technical service provider (TSP).
- Client ID, Client secret and Client version take the connection details JPRAXC provides for this arrangement. JPRAXC support can fill these in with you.
- In End merchant ID (X-MERCHANT-ID), enter the school's own PhonePe merchant ID exactly as PhonePe issued it.
- Leave Merchant server IP (partner integrations, optional) blank unless JPRAXC support asks you to fill it.
- In Webhook authentication, choose SHA username and password, and make up a Webhook username and Webhook password.
- Select Save settings, then Test connection. For this route, the test also checks that PhonePe recognises your merchant ID.
- Select Register webhook with PhonePe. The ERP registers its own webhook address with PhonePe for order and refund events. If it is already registered, the ERP says so and adds nothing.
Test, then go live#
- Select Start sandbox payment and complete a test payment. See Test a payment end to end.
- Get the production credentials from PhonePe (or, through JPRAXC, confirm the production merchant ID with JPRAXC support).
- In the ERP panel select Live environment, fill in the live values the same way, tick Enable and use this gateway for fee payments and select Save settings.
- Register the live webhook: in PhonePe's dashboard for Option A, or with Register webhook with PhonePe for Option B.
- Select Test connection for the live settings.
Good to know#
- PhonePe is the one gateway whose settlements the ERP can fetch. In Fees › Online fee collection, open Bank settlements and use Fetch settlements from PhonePe. See Reconciliation and settlements.
- The ERP confirms every PhonePe payment by checking its status with PhonePe. The webhook only makes the check happen sooner.
- A PhonePe order that the parent abandons expires after a while and shows as failed. Nothing is recorded for it.
- Refund from the ERP, not from the PhonePe dashboard. See Refund an online payment.
Troubleshooting#
| What you see | What to do |
|---|---|
| PhonePe client version must be the number issued by PhonePe. | Enter the numeric client version from PhonePe, digits only. |
| Enter the end merchant ID exactly as PhonePe issued it | Re-type the merchant ID as PhonePe issued it: letters, digits, underscore or hyphen only. |
| Test connection fails on the through-JPRAXC route | Check the End merchant ID. If it is correct, contact JPRAXC support. |
| Payments stay Awaiting confirmation | Check that the webhook exists in PhonePe for this environment with the same SHA username and password. Payments are still confirmed by the ERP's own checks, only more slowly. |
