@monkish/vendure-paystack-plugin
v0.0.3
Published

Readme

Paystack Vendure Plugin
Enable payments through Paystack.
Installation
yarn add @monkish/vendure-paystack-pluginUsage
- Create a Paystack account and get your secret key from the Paystack dashboard.
- Register the plugin in your Vendure config:
plugins: [PaystackPlugin.init()];- In the Admin UI, create one PaymentMethod and select Paystack payments as the handler.
- Set the handler
secretKeyargument to your Paystack secret key. - Set the webhook URL in Paystack to
https://my-server.com/payments/paystack, wheremy-server.comis your Vendure host.
Be sure to select the 'Check whether Paystack supports the payment' eligibility checker when creating the payment method. Paystack only supports the
NGN,USD,GHS,ZARandKEScurrencies.
- Call the
createPaystackPaymentIntentmutation on checkout to initialize a transaction and return the access code for use with Paystack Popup on the storefront.
createPaystackPaymentIntent input
callbackUrl(required): Paystack callback URL override.channels(optional): restrict the available Paystack channels.metadata(optional): JSON metadata sent to Paystack.paystackAmount(optional): amount to charge in minor units. This affects only the Paystack charge amount and does not change Vendure order totals.
Notes
- The plugin is designed for one configured Paystack payment method.
- The webhook signature (
x-paystack-signature) is validated using thesecretKeyfrom that configured Paystack payment method.
