Stripe

Stripe Checkout-এ পেমেন্ট: লাইভ ও টেস্ট কী, ওয়েবহুক ও তার সাইনিং সিক্রেট, ইনভয়েস থেকে রিফান্ড, টেস্ট কার্ড, আর সাধারণ এরর।

The Stripe plugin takes payments through Stripe Checkout, a payment page hosted by Stripe. The client presses a button on the invoice, is sent to Stripe, pays there, and comes back to the invoice. Which cards, wallets and local payment methods appear on that page is decided by your Stripe account, not by AIOBilling. The plugin is free, takes the invoice's currency (including currencies without cents, such as JPY), and can send refunds to Stripe from the invoice. It is a good first choice for clients abroad. See Payment gateways for what all gateways share.

Switching it on

  1. Open Setup → Payment Gateways, tab All Payment Gateways, and press Activate on Stripe.
  2. On the settings page enter the keys (below) and save.
  3. In Stripe add the webhook with the Webhook URL shown on the same page.
  4. Test with Stripe's test keys first.

Settings

SettingMeaning
Display name, Payment instructions, Fee %, Fixed feeThe settings every gateway has: the name clients see, a text under the button, and a surcharge.
Test modeUse the test keys below instead of the live ones.
Live secret keyStarts with sk_live_. In the Stripe dashboard: Developers > API keys.
Live webhook signing secretStarts with whsec_. Shown by Stripe after you add the webhook.
Test secret keyStarts with sk_test_. Used while Test mode is on.
Test webhook signing secretThe whsec_ secret of the webhook you made in Stripe's test mode.
Webhook URLRead only: your callback address, such as https://billing.example.com/callback/stripe. Copy it into Stripe.

The four secrets are password fields: they show empty with (unchanged), and an empty box keeps the saved value. The keys are grouped on the page under Live keys, Test keys and Webhook.

What Stripe needs from you

  • A Stripe account that is allowed to take payments in your currency.
  • The secret key (not the publishable key; this plugin does not use it).
  • A webhook endpoint in Developers > Webhooks: paste the Webhook URL and select the event checkout.session.completed. The plugin also accepts checkout.session.async_payment_succeeded for payment methods that finish later. Copy the signing secret that Stripe shows into the matching field here. Make one endpoint in live mode and one in test mode, each with its own secret.
  • No IP address needs to be whitelisted.
  • HTTPS on your site and the PHP curl extension. The server clock must be right: a webhook older than five minutes is refused.

How a payment goes

  1. The client presses Pay ... by card on an unpaid invoice of their own. AIOBilling creates a Checkout Session for the balance due, with the invoice number as the product name, and sends the client to Stripe.
  2. The client pays on Stripe. Stripe sends the browser back to the invoice and sends the signed webhook to your callback address.
  3. Both ways end in the same check: the session must be paid, and its currency must be the invoice's currency. The amount recorded is what Stripe charged.
  4. A transaction is added (its ID is Stripe's payment intent), the Stripe fee is read from Stripe and saved with it, and the invoice is marked paid. If the browser and the webhook both arrive, the payment is recorded once.

The webhook is the safety net for a client who closes the tab before coming back, so do not skip it.

Refunds

On the invoice open the Refund tab, choose the transaction, give the amount (all or part) and under Refund to choose Refund through the payment gateway. The plugin asks Stripe for the refund and records it when Stripe accepts. If Stripe refuses, the message says why (for example, more than was captured). See Invoices and payments.

Testing

  1. Enter the Test secret key and make a test-mode webhook; enter its secret as Test webhook signing secret.
  2. Switch Test mode on.
  3. Pay a small invoice with the test card number 4242 4242 4242 4242, any future date and any CVC.
  4. The invoice should turn Paid, and in Stripe's test dashboard the webhook shows a 200 answer.
  5. Switch Test mode off and make sure the live keys and the live webhook secret are filled in.

Troubleshooting

Look at Billing → Gateway Log (filter Stripe) and Utilities → Module Log.

Message or resultCure
Stripe is not set up yet: the secret key is missing.Fill the key for the mode you are in (live or test).
Stripe could not start the payment: ...Stripe's own words follow: a wrong key, a currency your account cannot take, or an amount below Stripe's minimum.
bad signature / The webhook signature is not valid.The signing secret is wrong or empty, belongs to the other mode, or the server clock is more than five minutes off.
currency mismatchThe session was paid in another currency than the invoice.
The Stripe session could not be checked.The secret key is wrong or the server could not reach Stripe.
Nothing is due on this invoice.The invoice is already paid in full.

If a client paid but the invoice stays unpaid and the log has no line at all, the webhook is not reaching you; check the endpoint in Stripe's dashboard for failed deliveries. You can always record the payment by hand with Add Payment. More in Troubleshooting.

এই লেখাটি কি কাজে লেগেছে?

হালনাগাদ 2026-11-03