Skip to main content
Accept payments with minimal integration using Payvessel’s hosted checkout. Customers can pay with card or bank transfer in a single modal. Ideal for e-commerce, donations, and subscriptions.

Overview

Payvessel Checkout provides a secure, conversion-optimized payment interface. You can integrate it in two ways:
  1. npm package (Recommended): A lightweight frontend SDK that handles the modal UI and payment channels.
  2. Merchant Checkout API: A server-side integration for custom redirects or backend-driven flows.

Integrating with payvessel-checkout

The payvessel-checkout package is the fastest way to add payment capabilities to your web application.

Installation

Install the package via npm or Yarn:
npm install payvessel-checkout
# or
yarn add payvessel-checkout

Usage Examples

Include the SDK via CDN or bundle it with your app.
<!-- Via CDN -->
<script src="https://unpkg.com/payvessel-checkout@latest/dist/index.umd.js"></script>

<script>
  const openCheckout = async () => {
    const init = PayvesselCheckout.Checkout({
      api_key: "YOUR_PUBLIC_API_KEY",
    });

    await init.initializeCheckout({
      customer_email: "customer@example.com",
      customer_name: "John Doe",
      customer_phone_number: "08012345678",
      amount: "5000",
      currency: "NGN",
      channels: ["BANK_TRANSFER", "CARD"],
      onSuccess: (response) => {
        console.log("Initialization Successful", response);
      },
      onSuccessfulOrder: (orderDetails) => {
        console.log("Payment Successful", orderDetails);
        // Verify payment on your server
      },
      onError: (error) => {
        console.error("Checkout Error", error);
      },
      onClose: () => {
        console.log("Checkout Closed");
      }
    });
  };
</script>

<button onclick="openCheckout()">Pay Now</button>

Essential Parameters

ParameterTypeRequiredDescription
api_keystringYesYour Public API Key from the dashboard.
customer_emailstringYesThe customer’s email address.
amountstringYesAmount to charge in naira (e.g., “100” for ₦100.00).
currencystringYesCurrency code, default is NGN.
channelsarrayNoPayment methods: ["BANK_TRANSFER", "CARD"].
referencestringNoYour unique transaction reference.

Server-Side Verification

After a successful payment, always verify the transaction on your server before providing value to the customer.
  1. Listen for webhooks from Payvessel.
  2. Or use the Verify Transaction API to check the status manually.
For technical details, see the Confirm Transaction API reference.

Next Steps

Initialize API Reference

Request/response schemas for server-side integration.

Verify API Reference

How to confirm payments accurately.