Setup
- Environment variables
- Direct config
How it works
Paystack uses an initialize-then-verify flow.createCheckout calls POST /transaction/initialize and returns an authorization_url. After payment, retrieve the transaction with retrievePayment(reference). Amounts are in the smallest currency unit (kobo for NGN).
Webhooks
Enable these events in your Paystack dashboard:charge.successcharge.failedcustomer.createcustomeridentification.successcustomeridentification.failedsubscription.createsubscription.not_renewsubscription.disableinvoice.createinvoice.updateinvoice.payment_failedrefund.pendingrefund.processedrefund.failed
x-paystack-signature header.
Raw Paystack events
Opt into any native Paystack event — fully typed against Paystack’s API types:| Event | Data type |
|---|---|
paystack.charge.success | PaystackTransaction |
paystack.charge.dispute.create/remind/resolve | PaystackDispute |
paystack.customeridentification.success/failed | PaystackCustomerIdentification |
paystack.dedicatedaccount.assign.success/failed | PaystackDVAAssignment |
paystack.invoice.create/update/payment_failed | PaystackInvoice |
paystack.paymentrequest.pending/success | PaystackPaymentRequest |
paystack.refund.failed/pending/processed/processing | PaystackRefund |
paystack.subscription.create/enable/disable/not_renew | PaystackSubscription |
paystack.transfer.success/failed/reversed | PaystackTransfer |