# SSLCOMMERZ Payment Gateway Integration

SSLCOMMERZ is Bangladesh’s first and largest payment gateway, enabling merchants to accept digital payments online since 2010. Supporting over 30 payment methods—including credit/debit cards (Visa, MasterCard, etc.), mobile payments (bKash, Nagad, Rocket), net banking, and EMI options—SSLCOMMERZ serves thousands of businesses in Bangladeshi Taka (BDT). With features like Easy Checkout, Instant Payment Notifications (IPN), PCI DSS compliance, and robust fraud protection, it’s ideal for e-commerce, subscriptions, and local businesses aiming to streamline payments.

This guide walks you through integrating SSLCOMMERZ into your application, from account creation to live deployment.

### Step 1: Log in or Sign Up

1. Visit SSLCOMMERZ: Go to SSLCOMMERZ and click Sign Up to create a merchant account or Log In if you have one.
2. Account Creation: Provide your email, business name, phone number, and details (e.g., company type, website URL). The onboarding process is fully online.
3. Email Verification: Check your inbox for a verification email and follow the link to activate your account.
4. Dashboard Access: Log in to the SSLCOMMERZ Merchant Panel at securepay.sslcommerz.com. Sandbox credentials are provided for testing.

### Step 2: Set Up Your Account

Before processing payments, configure your SSLCOMMERZ account:

1. Complete Your Profile:

- In the Merchant Panel, go to My Profile.
- Enter your business details: legal name, address, TIN (if applicable), and website URL (required for live transactions).

1. Business Verification (Required for Live Mode):

- Navigate to My Stores > Verification.
- Submit documents like a trade license, NID, and bank details (specific to Bangladesh).
- Verification takes 1-2 business days; you’ll be notified via email.

1. Add a Settlement Bank:

- Go to My Stores > Bank Details.
- Add your bank account (e.g., account number, bank name) for payouts. Settlements occur within T+2 days.
- Verify with a test deposit if prompted.

1. Sandbox Mode: Use the Sandbox at developer.sslcommerz.com with test credentials to simulate payments without verification.

### Step 3: Obtain API Credentials

SSLCOMMERZ provides credentials for integration:

- Store ID: Your unique merchant identifier (e.g., `teststore123` for Sandbox).
- Store Password: A secret key for API authentication (e.g., `abc123xyz`).
- Test vs. Live: Sandbox credentials are issued upon signup; live credentials require verification.

##### How to Get Your Credentials:

1. Log in to the Merchant Panel.
2. Go to My Stores > Credentials.
3. Find:

- Store ID: Displayed for each store (Sandbox or Live).
- Store Password: Reveal or regenerate it here.

1. Sandbox Credentials: Register at developer.sslcommerz.com/registration/ for instant Sandbox Store ID and Password.
2. Key Security: Keep the Store Password confidential—use it server-side only. Add credentials to your application’s Admin Panel under System Settings > Payment Gateways > SSLCOMMERZ.

### Step 4: Configure Payment Methods

SSLCOMMERZ supports 30+ payment methods, customizable via the Dashboard:

1. Go to My Stores > Payment Channels.
2. Available methods include:

- Cards: Visa, MasterCard, Nexus (enabled by default).
- Mobile Banking: bKash, Nagad, Rocket.
- Net Banking: 30+ Bangladeshi banks.
- EMI: Enable via agreement with SSLCOMMERZ.

1. Toggle desired methods on. Contact support@sslcommerz.com for EMI or additional options.
2. These methods appear in your checkout flow once integrated.

### Step 5: Set Up Webhooks

Webhooks (Instant Payment Notifications, IPNs) notify your server of payment events:

1. In the Merchant Panel, go to My Stores > IPN Settings.
2. Click Edit IPN URL.
3. Webhook URL:

- Enter the URL from your application (e.g., `https://yourwebsite.com/webhooks/sslcommerz`).
- Find this URL in your Admin Panel under SSLCOMMERZ settings.
- Ensure your endpoint accepts POST requests, uses TLS 1.2+, and returns a 200 OK response.

1. Events: SSLCOMMERZ sends events like:

- `status=VALID`: Payment successful.
- `status=FAILED`: Payment failed.
- Use `tran_id` to track transactions.

1. Save the IPN URL. Validate notifications with the Transaction Validation API.
2. Testing: Test IPNs in Sandbox mode via sandbox.sslcommerz.com.

### Step 6: Set Up Credentials in Our Dashboard

Integrate SSLCOMMERZ into your application:

1. Log in to your application’s Admin Panel.
2. Navigate to System Settings > Payment Gateways > SSLCOMMERZ.

1. Fill out the configuration form:

1. Detailed Fields:

- Supported Currencies: SSLCOMMERZ supports BDT only. Select “BDT”.
- Active: Toggle “On” to enable SSLCOMMERZ payments.
- Live Mode: Toggle “Off” for Sandbox, “On” for live transactions.
- Store ID: Enter your Store ID (e.g., `teststore123`).
- Store Password: Enter your Store Password (e.g., `abc123xyz`).
- Webhook URL: Copy this URL and paste it into the Merchant Panel’s IPN settings.
- Minimum Amount: Set a floor (e.g., ৳10) per SSLCOMMERZ rules.
- Maximum Amount: Set a ceiling (e.g., ৳1,00,000) based on your needs.
- Fixed Charge: Add a flat fee (e.g., ৳5) per transaction, if applicable.
- Percentage Charge: Add a percentage fee (e.g., 1%) on top of SSLCOMMERZ’s fees (2% + VAT).

1. Click Submit to save. Your SSLCOMMERZ gateway is now configured.

### Step 7: Test the Integration

Test your setup in Sandbox Mode:

1. Enable Sandbox Mode:

- In your Admin Panel, ensure Live Mode is off and use Sandbox credentials.
- Use the Sandbox endpoint: `https://sandbox.sslcommerz.com`.

1. Simulate Payments:

- Use test cards from SSLCOMMERZ Testing Guide:
- Success: `4111 1111 1111 1111`, expiry `12/25`, CVV `123`.
- Failure: `4000 0000 0000 0002`, expiry `12/25`, CVV `123`.
- Test mobile banking (e.g., bKash) with Sandbox flows.

1. Verify Webhooks:

- Check your server logs for IPN events (e.g., `status=VALID`).
- Validate with the Transaction Validation API: `https://sandbox.sslcommerz.com/validator/api/validationserverAPI.php`.
- Ensure payment statuses update in your Admin Panel (e.g., “Paid,” “Failed”).

1. Debugging: Check the Merchant Panel’s Transactions tab for error details (e.g., “Invalid Credentials”).

### Step 8: Enable Live Mode

After successful testing:

1. SSLCOMMERZ Dashboard:

- Ensure your account is verified and ready for live transactions.
- Log in to securepay.sslcommerz.com.

1. Admin Panel:

- Go to System Settings > Payment Gateways > SSLCOMMERZ.
- Toggle Live Mode to “On”.
- Replace Sandbox credentials with live Store ID and Password.
- Update the endpoint to `https://securepay.sslcommerz.com`.
- Save the changes.

1. Webhook Confirmation: Verify the IPN URL is set in the live Merchant Panel.

### Step 9: Go Live

Launch your SSLCOMMERZ integration:

1. Start Accepting Payments:

- Customers can now pay via enabled methods at checkout.
- Monitor initial transactions for issues.

1. Live Verification:

- In the Merchant Panel, go to Transactions to track payments in real-time.
- Confirm settlements to your bank account (T+2 days).

1. Troubleshooting:

- If payments fail, review logs in the Merchant Panel or contact support@sslcommerz.com.
- Ensure your webhook endpoint remains active.

## Additional Tips

- SSLCOMMERZ Fees: 2% + VAT per transaction (standard rate). EMI fees vary by agreement. No setup or monthly fees. See pricing.
- Documentation: Explore the SSLCOMMERZ Developer Docs for APIs like Easy Checkout, Hosted Checkout, or IPN setup.
- Support: Contact support@sslcommerz.com or integration@sslcommerz.com for technical assistance.

## Note:

If you need further help, our support team is available 24/7. Reach out at softivus@gmail.com or through the Admin Panel. Let’s make your SSLCOMMERZ integration secure and efficient!