- Start a payment for the amount of an order and send the customer to Paystack’s checkout page
- Open Paystack’s checkout in a popup, so the customer stays on your page
- Mark an order as paid only after Paystack confirms the payment, its amount, and its currency
- Sell subscriptions with Paystack plans and stop a subscription from renewing
- Refund a payment in full or in part
- List recent transactions and their status
Common use cases and example apps
These examples show what you can build with Paystack, each with a prompt to start from.How to connect Paystack
Who can create Paystack connections depends on your plan and workspace settings. App + chat connectors are available by default. On Business and Enterprise plans, Who can create connections and clients starts at Admins. Some Enterprise workspaces start at No one, which disables the connector. An admin or owner changes it in Connectors → Admin settings → App + chat connectors. You can create multiple Paystack connections using different API keys, which is useful for separating test and live payments or connecting different Paystack businesses. When the connection is created, you can link it to the projects where you want to use it. Anyone building in a project can ask Lovable in the project chat to link their project to it. Linking follows the connection’s access rules. Link one Paystack connection to a project at a time. Your app uses only the first linked connection. When you’re ready to take real payments, unlink the test connection and link the live one. Then ask Lovable to register the webhook again, as described in How payments are confirmed.Prerequisites
Before connecting Paystack, make sure you have:- A Paystack account with a business
- The secret key of that business
- Permission to create connections in your Lovable workspace (see Who can create connections and clients)
Payments made through this connector go to your Paystack business. Paystack charges its transaction fees directly, and billing is handled by Paystack, not Lovable.
Step 1: Get your Paystack API keys
A Paystack secret key lets your Lovable app start and read payments for one Paystack business. Each business has a test secret key, which starts withsk_test_, and a live secret key, which starts with sk_live_. Payments made with a test key move no money.
Each mode also has a public key, which starts with pk_test_ or pk_live_. The public key is optional in Lovable.
To get your Paystack API keys:
1
Open your Paystack Dashboard
Sign in to the Paystack Dashboard.
2
Open API keys
Go to Settings → API Keys & Webhooks. The dashboard shows the keys for the mode you have selected, test or live.
3
Copy the secret key
Copy the secret key and store it securely. If you also want the public key, copy it from the same mode.
Step 2: Connect Paystack to Lovable
Use your test keys for the first connection, so you can try payments without moving real money.1
Open Paystack in Connectors
Open Connectors and select Paystack. For the other places to open the catalog from, see Where to find connectors.
2
Add a connection
Click Connect on the connector page. The form has three sections, Details, Configure connection, and Sharing.
3
Name the connection
Under Details, Lovable fills in Display name, which you can change. The name is only used inside Lovable to identify the connection, for example
Paystack Test or Paystack Live.4
Configure the connection
Under Configure connection, enter:
- Secret key: paste your Paystack secret key. It must start with
sk_test_orsk_live_. Open API Keys & Webhooks opens that page in the Paystack Dashboard. - Public key (optional): paste the public key from the same mode as the secret key. It must start with
pk_test_orpk_live_. Both checkouts on this page, the checkout page and the popup, work without it, so you can leave it empty. Paste it only if you ask Lovable for a checkout that uses Paystack’s public key.
5
Choose who can use this connection
Under Sharing, the connection is private to you by default and shows a Private label. To share it, click Share with others. Then add workspace members by email, or click Invite entire workspace to make the connection available to everyone in your Lovable workspace.See Who can use connections and clients for more information.
6
Connect
Click Connect at the bottom of the form. Lovable checks the secret key with Paystack when you connect.
How payments are confirmed
Lovable builds your app so it sets the amount of each payment from the order. Customers cannot change the amount. After the customer pays, your app asks Paystack for the transaction. Your app marks the order as paid only when Paystack reports the transaction as successful and the amount and currency match the order. Your app does not treat the customer’s return to your site as proof of payment. Paystack also tells your app about a payment by calling a webhook, a public address in your app. The webhook covers customers who close the browser before they return to your site. Paystack can’t reach the editor’s preview, so Lovable sets up the webhook on an address that Paystack can reach while you build. You can take test payments before you publish the app. On new Lovable apps created from May 13, 2026, which use TanStack Start, ask Lovable to register the webhook again after you publish for the first time, so Paystack also calls the published app. Older React + Vite apps keep the same webhook address after publishing. Lovable can add the webhook address to your Paystack business when you ask for it in the project chat. If Paystack does not accept the request, Lovable gives you the address, and you add it as the webhook URL under Settings → API Keys & Webhooks in the Paystack Dashboard. Paystack keeps separate webhook settings for test and live payments. After you link a live connection, ask Lovable to register the webhook again.Limitations
The Paystack connector cannot:- Take a payment in a currency that is not enabled on your Paystack business. Paystack decides which currencies a business accepts.
- Send payouts. Lovable builds payments with this connector, not transfers from your Paystack balance to bank accounts or mobile wallets.
- Charge a saved card without a checkout. Every payment starts on Paystack’s checkout, so one-click repeat payments and usage-based charges are not available. A customer who changes plans or returns after cancelling pays through the checkout again.
- Collect card numbers or mobile money details in your own form. Customers enter them on Paystack’s checkout, which also offers bank transfer and mobile money.
- Split a payment between sellers. Marketplaces use split payments to send each seller’s share to that seller’s own account. They are not available.
- Send invoices or payment links. Your app starts each payment itself and sends the customer to Paystack’s checkout.
- Create dedicated virtual accounts, which are bank account numbers that Paystack assigns to one customer for paying by transfer. Bank transfer stays available on Paystack’s checkout.
- Handle disputes, which are payments that a customer has challenged with their bank. Respond to them in the Paystack Dashboard.
- Read your Paystack balance or look up the holder of a bank account.
- Support per-end-user Paystack login. Each connection represents a single Paystack business shared across all projects linked to it.
Troubleshooting
Use these checks when connecting fails or a payment does not start.Paystack did not validate your credentials.
Paystack did not validate your credentials.
Paystack rejected the secret key, or the two keys are from different modes. Check that you copied the whole secret key and that it starts with
sk_test_ or sk_live_. If you entered a public key, check that both keys are test keys or both are live keys from the same Paystack business. Click Show error to see the reason.A payment fails with a currency error
A payment fails with a currency error
Paystack refuses a payment in a currency that is not enabled on your business. Tell Lovable in the project chat which currency your Paystack business accepts, for example NGN, GHS, KES, or ZAR.
Manage your Paystack connection
Connections are managed from Connectors: select Paystack, then open the connection.- Unlink projects to remove Paystack access from specific projects while keeping the connection available for others. See Unlink projects from a connection for the steps.
- Delete the connection to remove it from the workspace entirely. Deleting is permanent. It removes the credentials from all linked projects, and app features that use Paystack stop working until a new connection is added. See Delete a connection for the steps and who can delete.