Connect SabPaisa
Get the API key, secret key and client code from your SabPaisa dashboard and connect them in Payment Configuration.
Use this guide to connect the school's own SabPaisa merchant account to the School ERP. The card is called SabPaisa. It needs API Key (X-Api-Key), Secret Key and Merchant ID / Client Code, and Webhook Secret only in one case explained below. SabPaisa's staging (test) and live keys are different, and staging keys never work in live.
Before you start#
- The school has an approved SabPaisa merchant account.
- You have the school administrator's login for the School ERP.
- Student records carry a name in letters and spaces, the father's 10-digit Indian mobile number, and an e-mail address. SabPaisa needs all three for every payer.
- Read Set up a gateway in Payment Configuration once.
SabPaisa's screens change from time to time. If a menu below looks different, follow SabPaisa's own developer documentation.
Get your keys from SabPaisa#
- Sign in to the SabPaisa dashboard and choose the staging environment.
- Open Developers, then API Keys.
- Copy the API key and the secret key.
- Note your client code. SabPaisa also calls it the merchant ID.
- If SabPaisa has issued a separate webhook secret for your account, note it too. If not, you do not need one.
Enter them in the School ERP#
- Open General Settings › Payment Configuration.
- Set Environment to Test / sandbox, then select Configure on the SabPaisa card.
- Check that Test environment is selected.
- Paste into API Key (X-Api-Key), Secret Key and Merchant ID / Client Code.
- Fill Webhook Secret only if SabPaisa gave you a webhook secret different from the secret key. Otherwise leave it blank.
- Select Save settings.
The ERP sends SabPaisa the address to return the parent to with every payment. It does not show a webhook or return address for SabPaisa, so there is nothing to register in SabPaisa's dashboard. The ERP confirms each SabPaisa payment by asking SabPaisa for its status.
SabPaisa has no Test connection button in the ERP. You prove the keys with a sandbox payment instead.
Test, then go live#
- Select Start sandbox payment and complete a test payment. See Test a payment end to end.
- Switch the SabPaisa dashboard to live and copy the live API key, secret key and client code.
- In the ERP panel select Live environment, paste them, tick Enable and use this gateway for fee payments and select Save settings.
Good to know#
- A single SabPaisa payment can be from ₹1 to ₹10,00,000.
- Refunds can be started from the ERP. SabPaisa processes them in the background, and the ERP shows the refund as complete only when SabPaisa reports success. See Refund an online payment.
- SabPaisa settlements are not fetched into the ERP. Record each bank settlement by hand. See Reconciliation and settlements.
Troubleshooting#
| What you see | What to do |
|---|---|
| SabPaisa needs the payer name in letters and spaces, 2 to 100 characters. | The student's name has a character SabPaisa does not accept, such as a full stop or a digit. If the school offers another gateway, the family can choose it under Pay with. Correct the student's record only if the name was entered wrongly. |
| A parent sees an error about the mobile number or e-mail | Check that Father mobile is a 10-digit Indian mobile number starting with 6, 7, 8 or 9, and that Email is filled in. |
| The sandbox payment fails at the start | Check that all three values are from the same environment (staging or live) as the one selected in the ERP. |
