Skip to content

Paystack

Collect cards in Naira, Cedi, Rand, Shilling and US Dollars, with one key to configure and cards saved as they pay.

Paystack collects card payments across Africa's major markets. It is the simplest gateway to connect: a single secret key covers both charging and webhooks.

The payment experience is embedded (Paystack's in-page popup) or hosted (redirect to Paystack's payment page and back).

Currencies

NGN, USD, GHS, ZAR and KES.

Connecting

Go to Settings, then Payment gateways, then Paystack. The wizard asks for one credential:

  • Secret key: in your Paystack dashboard under Settings, then API Keys and Webhooks. Charges are made with it, and inbound webhook events are verified against it; Paystack has no separate signing secret.

Use the test key (sk_test_) on the test connection and the live key on live.

Webhooks

Add the endpoint URL shown on the gateway page in the Paystack dashboard under Settings, then API Keys and Webhooks. Webhooks confirm charges that finish after the customer leaves the page, keep refunds up to date, and bring disputes in.

Saving cards and renewals

Paystack saves cards as a by-product of a successful charge: when a customer pays and chooses to keep their card on file, the card is stored for renewals as part of that payment. Renewals and automatic collection then charge the stored card.

What Paystack does not offer is saving a card without charging it: there is no zero-charge setup page. yRecurring handles this for you on the two surfaces that save without charging (the customer's update card page, and trial signup with no first payment):

  • If another connected gateway supports zero-charge saving, the card is saved through that gateway instead, and future renewals charge whichever gateway holds the card.
  • If not, the update page explains that paying the next invoice will save the card automatically.

Nothing to configure; the fallback picks itself. See connecting a payment gateway for how the fallback chooses.

Removing a card in yRecurring also removes it from the customer's record at Paystack, so nothing is left behind.

Paystack has no way for us to read your saved cards back out, so if you are migrating from another billing system, bring their token references in by file. See migrating saved payment methods.

Refunds and disputes

Refunds are sent to Paystack against the original transaction. See refunds. Disputes raised at Paystack appear on the payment's activity trail automatically. When a dispute closes against you, the chargeback is recorded on the customer's account automatically (see refunds).

Test cards

Card Number Notes
Visa, succeeds 4084 0840 8408 4081 CVV 408, any future expiry; PIN 0000, OTP 123456
Declined 4084 0800 0000 5408 CVV 001
Insufficient funds 4084 0840 8408 4081 charge NGN 1,000,000 or more; Paystack simulates this by amount, not by card number

Limits

  • Cards only.
  • No zero-charge card saving (the fallback above covers it).
  • Only cards a customer agreed to keep on file (Paystack calls these reusable authorizations) can be charged again, so those are the only ones a migration brings over.