Documentation index for AI agents (llms.txt)
Skip to main content

Paystack

Take payments in Nigeria, Ghana, Kenya, South Africa and more with cards, bank transfers, USSD and mobile money through Paystack Checkout. Money goes straight to your Paystack account.

Connect​

Paystack connects with your secret key and public key.

  1. Open Settings > Connectors, click Paystack, then Connect.
  2. Paystack's Settings > API Keys & Webhooks page opens.
  3. Copy the Secret Key, then the Public Key. Each is picked up when you come back to WebTwizz, then checked with Paystack and connected. You can also paste them into the fields yourself.

Use both keys from the same mode: both test, starting sk_test_ and pk_test_, or both live. Test keys take test payments only.

Then ask the AI for what you need, like "add a checkout for the ₦15,000 class pass".

What you see​

  • Transactions, last 30 days: what came in (Received) and how many payments, then your latest transactions with the amount, how it was paid and when. A tag shows when one is refunded, failed or still pending. In test mode the heading says so. Refund on a successful transaction opens an amount field in place, filled with the whole amount: lower it to refund part. The line under it says how much goes back to whom, and with test keys that no real money moves. Confirm with Refund and the amount. Show more loads ten older ones. Each row opens in Paystack, and All transactions opens your transactions.
  • Disputes: shown when a customer disputes a payment and Paystack is waiting on you, with the amount, the reply-by date and the reason. Respond on Paystack opens it. All disputes opens Paystack.
  • Payouts: your Balance by currency, then your latest payouts to the bank with their date and fees, and a tag while one is on the way or if it failed. All payouts opens Paystack. It shows when your key can read them.
  • Payment pages: shown once you have a Paystack payment page, with its price, or Any amount, and its address. Copy link copies it. Turn off asks first, then the page stops taking payments. You can turn it back on in Paystack. A page that's off shows Off. Show more loads ten more. All pages opens Paystack.
  • Account: the key this project uses, with Test keys or Live keys and Replace key.
  • Settings:
    • Webhook: the address that tells your site about each payment, with a copy button. Add it in Paystack under Settings > API Keys & Webhooks, as the Test Webhook URL or Live Webhook URL to match your keys. It shows After you publish until the site is live.
  • Open Paystack, at the top next to the name, opens your transactions.

What the AI can do​

  • Build checkout into your site: the payment starts on the server, Paystack's page or popup takes it, and the payment is confirmed on the server before anything is fulfilled
  • Read your transactions and what they brought in, for any period up to 90 days
  • Make a Paystack payment page to share. It asks first.
  • Refund a transaction, in full or in part. It asks first.

Secrets​

  • PAYSTACK_SECRET_KEY: your secret key, server-side only. It also checks that payment events really come from Paystack.
  • NEXT_PUBLIC_PAYSTACK_PUBLIC_KEY: your public key, safe to use in the browser

Good to know​

  • Replace key takes a new secret key in the same mode as your public key. To switch between test and live, connect the other pair as another account, then switch the project to it.
  • Until you add the webhook in Paystack, your site only hears about a payment when the buyer comes back to it.
  • Removing Paystack from a project takes its secrets out. Your Paystack account and transactions are untouched.