v1.0.0
View PowerUp →Paystack Payment Extension
Accept payments via Paystack on your TastyIgniter site. Paystack is a payment gateway supported in Nigeria, Ghana, Kenya, South Africa, and other African countries, with support for multiple currencies and payment methods.
Features
- Multiple payment methods — card, bank transfer, USSD, mobile money, QR
- Saved cards — customers can save authorization codes for faster future payments
- Refunds — full or partial refunds initiated from the admin order view
- Two integration modes — Pop-up (Paystack inline) or Redirect (hosted checkout)
- Webhook handling — automatic payment verification with HMAC SHA512 signature validation
- Multi-currency — supports any currency Paystack supports for your account
Quick Start
Installation
composer require tipowerup/ti-ext-paystack
php artisan igniter:up
Requirements
- TastyIgniter v4.0+
- PHP 8.2+
- The Pay Register extension installed and activated
Setup
- Go to Manage > Settings > Payment Gateways in the admin panel
- Edit the Paystack payment method
- Select Transaction Mode (Test or Live) and enter your matching Paystack secret key
- Choose Integration Type (Pop-up or Redirect)
- Toggle Status to ON and click Save
Configuration
Settings Overview
| Setting | Type | Default | Description |
|---|---|---|---|
| Transaction Mode | Radio | test | Run against Paystack test or live environment |
| Integration Type | Radio | popup | popup (Paystack inline) or redirect (hosted checkout) |
| Test Secret Key | Text | — | Paystack test secret key (visible when mode = test) |
| Live Secret Key | Text | — | Paystack live secret key (visible when mode = live) |
| Order Fee Type | Radio | Fixed | Fixed amount or percentage of order total |
| Order Fee | Currency | 0 | Surcharge added to the order total |
| Order Total | Currency | — | Minimum order total required for this method |
| Order Status | Select | — | Order status applied after a successful payment |
Paystack API Keys
Get your API keys from your Paystack Dashboard under Settings > API Keys & Webhooks. Always test against the test keys before going live — Paystack provides test card numbers for end-to-end testing.
Integration Modes
Pop-up Mode (default)
Customers stay on your checkout page; Paystack's inline JavaScript opens a modal for card entry. Best UX for most stores.
Redirect Mode
Customers are redirected to a Paystack-hosted payment page, then returned to your site after payment. Useful when popup blockers or third-party script restrictions are a concern.
Switch between modes any time from the payment method edit screen.
Webhook
Paystack sends webhook events to confirm successful charges out-of-band. This is the recommended way to ensure orders are marked paid even if the customer closes the browser before being redirected back.
Webhook URL
Your webhook URL is:
https://your-site.com/ti-paystack/handle/paystack_webhook
The exact URL is shown on the Paystack payment method edit page.
Configure in Paystack
- Log into your Paystack Dashboard
- Go to Settings > API Keys & Webhooks
- Paste the webhook URL into the Webhook URL field for the matching environment (test or live)
- Save
Security
Incoming webhook payloads are validated using HMAC SHA512 against your secret key (the x-paystack-signature header). Requests with invalid signatures are rejected. No IP whitelisting is required.
Saved Cards (Payment Profiles)
When a customer pays successfully, Paystack returns an authorization_code that can be reused for future charges without re-entering card details.
- Saved cards appear at checkout under "Pay with saved card"
- Customers can manage saved cards from their account profile
- Removal deletes the local record only — Paystack authorizations remain valid until the underlying card expires
Refunds
Refunds (full or partial) can be initiated from the Order view in the admin panel:
- Open the order
- Open Payment Logs
- Click Refund on a successful payment log entry
- Enter the refund amount (full or partial) and a reason
- Submit
The refund is processed via Paystack's refund API and recorded as a new payment log entry on the order.
Currency & Amounts
Paystack expects amounts in the smallest currency unit (kobo for NGN, pesewas for GHS, cents for USD/ZAR). The extension automatically multiplies the order total by 100 before sending it to Paystack — no manual conversion needed.
The transaction currency is taken from your TastyIgniter location currency. Make sure it matches a currency your Paystack account is configured for, otherwise transactions will be rejected.
Troubleshooting
"Invalid key" or authentication errors
Symptom: Paystack returns an authentication error when initialising a transaction.
Solution:
- Verify the secret key matches the selected Transaction Mode (test key with test mode, live key with live mode)
- Check the key was copied without leading/trailing whitespace
- Confirm the key has not been rotated in the Paystack dashboard
Webhook not marking orders as paid
Symptom: Customer paid successfully but the order status is not updated.
Solution:
- Confirm the webhook URL is configured in the Paystack dashboard for the correct environment
- Check the webhook delivery log in the Paystack dashboard — Paystack shows the response code from each delivery
- Inspect Laravel logs for signature validation failures (wrong secret key for the environment is the most common cause)
Customer redirected back but order not paid
Symptom: Customer is returned to the site but the order remains unpaid.
Solution:
- Wait for the webhook to fire (usually within seconds) — webhooks are the source of truth
- Check the Payment Logs on the order; failed verification calls are recorded there
- Ensure the configured currency on the payment method matches the order currency
Pop-up blocked by browser
Symptom: Pop-up integration shows nothing on click.
Solution:
- Some browsers block popups triggered outside a direct user click. Switch to Redirect mode if your customers commonly hit this.
Technical Details
Entry Points
| Route | Purpose |
|---|---|
paystack_initialize_transaction |
Initialises a transaction and returns the access code (popup) or redirect URL |
paystack_payment_successful |
Customer return URL (redirect mode); verifies the transaction |
paystack_webhook |
Server-to-server webhook receiver for Paystack events |
Order Hash
The order hash is sent to Paystack in two places for redundancy:
metadata.order_hashmetadata.custom_fields[].variable_name = "order_hash"
Either is read back during verification, so dashboard reporting and reconciliation both work.
Support
- Issues & Contributions: GitHub Repository
- Contact: tipowerup.com/contact
- Discord Community: tipowerup.com/social/discord