🎉 Celebrate with 10% OFF on All Products! Use Code: GFEX10 Or Buy Any 2+ Items for 30% OFF with Code: GFEX30!
Guides & Tutorials November 9, 2026

How to Take SSLCommerz Payments with Gravity Forms in Bangladesh

GravityExtra
How to Take SSLCommerz Payments with Gravity Forms in Bangladesh

If you sell classes, courses, event tickets, services or products in Bangladesh, SSLCommerz is very likely already part of your plans. It lets your customers pay online with the cards, mobile banking and internet banking accounts they use every day, all on one payment page. Gravity Forms is the form builder many WordPress sites use for bookings, registrations, orders and donations. This tutorial shows how to connect the two, so that every form submission becomes an SSLCommerz payment for the exact form total, and every payment is confirmed by SSLCommerz before your team treats it as paid.

We use the Gravity Forms SSLCommerz Premium Add-on, a plugin that talks to the SSLCommerz API from your own server. It takes about fifteen minutes from installing the plugin to your first test payment with a sandbox store.

Why take SSLCommerz payments through Gravity Forms?

Many small businesses start by collecting payments by hand: someone fills in a booking form, a team member sends payment details over chat or email, the customer pays and sends a screenshot, and somebody checks the merchant panel later to see whether the money really arrived. That works for a few orders a week, but it is slow for customers, hard to match up, and easy to get wrong when the numbers grow.

With the form and the payment joined together, the customer pays straight after submitting, the amount always matches what they chose in the form, and the entry in Gravity Forms shows the payment status, the bank transaction ID and any refunds. Your notification emails can wait until the payment is confirmed, so nobody starts work on an unpaid booking, and your accounts team can match every entry with the SSLCommerz transaction by its transaction ID.

How the payment works

  • The customer fills in your form and sees the total in taka, for example ৳ 2,450.00.
  • When they submit, your server starts an SSLCommerz payment session for that exact total and sends the customer to the SSLCommerz payment page.
  • They pay there with a card, mobile banking or internet banking, whatever you have switched on for your store. Card numbers and banking logins are entered at SSLCommerz, never on your site.
  • They come back to your form page, and the plugin asks SSLCommerz for the payment before it shows your thank-you message.

Forms that work well with SSLCommerz

  • Class, course and workshop bookings with a fixed price per seat.
  • Event and seminar registrations with ticket types and quantities.
  • Service deposits, for example for a consultation, a repair or a photo shoot.
  • Simple product orders where a full online shop would be too much.
  • Donations, admission fees and membership fees with a chosen amount.

What you need

  • WordPress with Gravity Forms 2.9 or newer.
  • An SSLCommerz sandbox store for testing: a store ID and a store password from the SSLCommerz developer registration.
  • For live payments, an approved SSLCommerz merchant store with its own live store ID and password.
  • A site SSLCommerz can reach from the internet, so it can send payment notifications (IPNs) to it.

Taka in Gravity Forms

One detail is easy to miss. Gravity Forms does not list the Bangladeshi taka by default. A site that sets a price of 950 in a currency Gravity Forms does not know can show odd totals or read amounts wrongly when the form is submitted. The plugin adds the taka, with the ৳ sign and two decimals, to the Gravity Forms currency list as soon as it is active, so the total on the form, the amount sent to SSLCommerz and the amount on the entry are the same number, to the poisha.

You can also run forms in US dollars, euros, Singapore dollars, Indian rupees or Malaysian ringgit. SSLCommerz converts those to taka at its current rate when the customer pays. The plugin checks the payment in the currency of your form, so a $19.99 form is confirmed as $19.99, while your settlement report at SSLCommerz shows the taka amount.

Gravity Forms currency Decimals Shown in forms as At SSLCommerz
Bangladeshi taka (BDT) 2 (poisha) ৳ 2,450.00 Charged as is; 10.00 to 500,000.00 BDT
US dollar (USD) 2 $19.99 Converted to BDT by SSLCommerz at its current rate
Euro (EUR) 2 19,99 € Converted to BDT
Singapore dollar (SGD) 2 $ 19.99 Converted to BDT
Indian rupee (INR) 2 ₹1,250.50 Converted to BDT
Malaysian ringgit (MYR) 2 RM 19.99 Converted to BDT

Step 1: Install the add-on and connect your store

SSLCommerz settings: Test or Live mode, the store ID and masked store password of each mode, the currency line, the connection line and the IPN address
Settings: enter the store ID and store password of the sandbox store (Test) and your live store (Live); the IPN address is sent with every payment.
  1. Upload and activate the plugin, then activate your licence key in Forms → Settings → SSLCommerz.
  2. Leave the mode on Test.
  3. Enter the store ID and store password of your sandbox store and save. The plugin checks them with SSLCommerz with a lookup that changes nothing, stores the password encrypted and only ever shows its first and last four characters.
  4. In Forms → Settings, set the Gravity Forms currency to Bangladeshi Taka.

Step 2: The IPN address

The IPN is how SSLCommerz tells your site that a payment went through, even if the customer closes the browser right after paying. The plugin sends its IPN address with every payment session, so it works without extra setup. You will find the address on the IPN line of the settings; you can also enter it in the IPN settings of your store in the SSLCommerz merchant panel. If your hosting has a firewall, make sure the SSLCommerz servers can reach your site.

Every IPN is checked against your store password. An IPN with a wrong or missing signature is refused, and a correct one is only a signal: the plugin still asks SSLCommerz about the payment before it changes anything.

Step 3: Build the form

A pottery class booking form with quantities, the customer name, email, phone, address and city, and the total in Bangladeshi taka, with the Continue to payment button
The form: Gravity Forms works out the total in taka; the customer pays it on the SSLCommerz payment page.

Create the form as usual. Add a name field, an email field, a phone field, an address and a city field, your product fields and a total field. SSLCommerz asks for the customer’s name, email and phone on every payment, so make those fields required. Prices follow the Gravity Forms currency, so a class at 950 taka shows as ৳ 950.00. Gravity Forms works out the total in the browser for the customer and again on your server when the form is submitted; the plugin always uses the server total.

Step 4: Add an SSLCommerz feed

The SSLCommerz feed: products and services with the form total, the customer name, email, phone, address and city mapping, the description with merge tags, the product category and notifications after payment
The feed: map the customer name, email and phone (required by SSLCommerz) and the address, and write the product description and category.

Open the form settings, choose SSLCommerz and add a feed. Pick Products and Services (or Donations), map the name, email and phone to your fields, and the address and city if your form has them. Write a description such as “Pottery class #{entry_id}” and a product category such as Education. The description becomes the product name you see for the payment in your SSLCommerz merchant panel. Keep “Send form notifications only after the customer has paid” ticked if your team should only hear about paid bookings.

Step 5: Test with your sandbox store

An entry paid through SSLCommerz: the SSLCommerz box with the status, amount, bank transaction ID, payment method, transaction ID, validation ID and SSLCommerz status, the Refresh status button and the refund form, and the entry notes
The entry: status, bank transaction ID and validation ID, read back from SSLCommerz, with refunds one click away.

Open your form, fill it in and submit. You land on the SSLCommerz sandbox payment page. Pay with one of the SSLCommerz test cards and you come back to your form page with the thank-you message. In Forms → Entries, the entry shows Paid, the bank transaction ID and a note that it was a test payment. Try a partial refund from the SSLCommerz box on the entry to see how refunds are recorded. Then start another payment and cancel it on the payment page: the customer is told nothing was charged.

What happens behind the scenes

  1. The form is checked on the server: the currency must be one SSLCommerz takes, the total must have no more than two decimals and be within the limits, and the email and phone must be filled in.
  2. A payment session is started for the exact amount, with a unique transaction ID for this attempt, signed return addresses and the IPN address.
  3. The answer must contain a session key and an address on the SSLCommerz payment page; otherwise the customer stays on the form and nothing is charged.
  4. When the customer returns, when an IPN arrives and every five minutes, the plugin asks SSLCommerz for every attempt of the transaction ID and checks the successful one with the Order Validation API.
  5. Only a payment the Order Validation API reports as valid, with your transaction ID, the entry amount and the entry currency, marks the entry Paid. Anything else is noted and left for you to check.

Why the read-back matters

An IPN or a page the customer returns to only says that something happened. Asking SSLCommerz with your own store credentials shows what really happened: whether the payment is valid, for how much and in which currency. The plugin never marks an entry Paid without it.

A worked example

A pottery studio in Dhaka sells a two-hour wheel class at ৳ 950.00 and a glaze and firing kit at ৳ 550.00. A customer books two classes and one kit. The form shows ৳ 2,450.00. On submit, the plugin starts an SSLCommerz session with a total of 2450.00 BDT and the product name “Pottery class #1042”. The customer pays with a card on the payment page. The IPN arrives a few seconds later; its signature is valid, so the plugin asks SSLCommerz about the transaction and validates the payment: valid, 2450.00 BDT. The entry becomes Paid, the held booking email goes out, and the bank transaction ID is stored on the entry. The next week the customer cancels one class, and the studio refunds 950.00 taka from the entry. The refund is recorded once, and the entry stays Paid with 1,500.00 taka left.

How it differs

  • It connects to your own SSLCommerz store directly with the SSLCommerz API, so SSLCommerz settles the money to you under your own merchant agreement, and the payment page shows every method you have switched on.
  • It never trusts the data posted back to your site or the IPN on its own. The IPN signature is checked with your store password, and then the payment is read back from SSLCommerz with the Order Validation API. Only a valid payment with the entry’s transaction ID, amount and currency marks the entry Paid.
  • It adds the taka and the rupee to Gravity Forms, so a total of ৳ 2,450.00 is shown, sent and stored as exactly 2450.00, never misread or rounded.
  • Refunds, including several partial refunds, are made from the Gravity Forms entry and recorded once per SSLCommerz refund.

Tips for smooth payments

  • Make the name, email and phone fields required: SSLCommerz asks for them on every payment.
  • Ask for the phone number with the country code, for example +880 1712-345678.
  • Keep prices at two decimals, for example 950.00 taka.
  • Use a clear description with the entry number, so your team can find the payment in the merchant panel quickly.
  • Check the IPN line in the settings after your first payment: it shows when the last valid IPN arrived.
  • For refunds in the live system, ask SSLCommerz to register the public IP address of your server.

Step 6: Go live

When your tests look right, enter the store ID and store password of your live store, switch the mode to Live and save. Make one small real payment and refund it. Each entry remembers whether it was paid in Test or Live, so older test entries keep working.

Questions

Do card details reach my website?

No. The customer enters them on the SSLCommerz payment page. Your site only receives the payment status from SSLCommerz.

Which currencies can I use?

Bangladeshi taka, and US dollars, euros, Singapore dollars, Indian rupees and Malaysian ringgit, which SSLCommerz converts to taka. The plugin adds the taka and the rupee to Gravity Forms.

What if the IPN never arrives?

The plugin also checks the payment when the customer returns and every five minutes, so the entry is updated anyway.

Can I refund part of a payment?

Yes, several partial refunds of taka payments up to the paid amount, from the entry screen. Payments in other currencies are refunded in your SSLCommerz merchant panel.

Are recurring payments or instalments supported?

Not in this version. The plugin handles one-off payments for products, services and donations.

Get started

Get the Gravity Forms SSLCommerz Premium Add-on and follow the setup guide. Plans: one site $49 a year, five sites $69 a year, unlimited sites $199 a year.

0
0
Your Cart
Your cart is emptyReturn to Shop
🔥 FREQUENTLY BOUGHT TOGETHER
Complete Combo & Save 40%!
ITEM IN YOUR CART
Gravity Forms Klaviyo Add-on
$39.00/yr
+
🎁 RECOMMENDED ADD-ON SAVE 40% OFF
Original Price: $39.00/yr
Bundle Special Price: $23.40/yr