> ## Documentation Index
> Fetch the complete documentation index at: https://docs.modempay.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Payment Form

The **Modem Pay Payment Form** plugin allows you to easily integrate secure payment forms into your WordPress site using the Modem Pay gateway. You can create custom payment pages, collect payments, and redirect users after successful transactions, all with a simple shortcode.

## ✨ Features

* Seamless integration with Modem Pay’s API
* Customizable payment forms with dynamic amounts and custom fields
* Responsive and modern design that adapts to your WordPress theme
* Secure form submissions using nonces and sanitized input
* Simple setup and user-friendly configuration interface

***

## ⚙️ Requirements

* WordPress **5.0+**
* PHP **7.4+**
* A **Modem Pay** account (test or live) to obtain API keys

***

## 🚀 Installation

Follow these steps to install and activate the plugin:

### 1. Download the Plugin

[Download `modempay-payment.zip`](https://github.com/chibuike-okpara/modem-pay-wordpress-plugin/releases/download/v1/modempay-payment.zip)

### 2. Upload and Activate

1. Log in to your WordPress Admin Dashboard.
2. Navigate to **Plugins → Add New**.
3. Click **Upload Plugin**, then select the `modempay-payment.zip` file.
4. Click **Install Now** → **Activate Plugin**.

<img src="https://mintcdn.com/modem/yM7VtPyYTpEqFm00/images/upload-payment-form-plugin.png?fit=max&auto=format&n=yM7VtPyYTpEqFm00&q=85&s=9cd1da9f222a0d06e8ffdfcc5abb353b" alt="Uploading plugin ZIP file" width="1753" height="397" data-path="images/upload-payment-form-plugin.png" />

### 3. Verify Installation

After activation, you’ll see **Modem Pay Forms** in your WordPress admin sidebar.

<img src="https://mintcdn.com/modem/yM7VtPyYTpEqFm00/images/modempay-activated.png?fit=max&auto=format&n=yM7VtPyYTpEqFm00&q=85&s=8582964a199507d6cfc3e34d88742ffe" alt="Sidebar Menu" width="1406" height="859" data-path="images/modempay-activated.png" />

***

## ⚙️ Configuration

You’ll need to set your API keys and preferences before accepting payments.

### 1. Get Your Modem Pay API Keys

1. Log in to your [Modem Pay Dashboard](https://modempay.com).
2. Go to **Developer → API Settings**.
3. Copy your **Test** and **Live** API keys.

<img src="https://mintcdn.com/modem/yM7VtPyYTpEqFm00/images/api-keys.png?fit=max&auto=format&n=yM7VtPyYTpEqFm00&q=85&s=5f69900946ffbe7614495fcabd4a9321" alt="Modem Pay Dashboard API Section" width="1915" height="522" data-path="images/api-keys.png" />

### 2. Open Plugin Settings

In WordPress:

* Go to **Modem Pay Forms → Settings**
* Paste your Public API keys into the appropriate fields:
  * **Public API Key**

<img src="https://mintcdn.com/modem/yM7VtPyYTpEqFm00/images/payment-form-settings.png?fit=max&auto=format&n=yM7VtPyYTpEqFm00&q=85&s=177273e507f793650e6e5551ff296efd" alt="Plugin Settings Page" width="1920" height="1084" data-path="images/payment-form-settings.png" />

***

## 💳 Creating a Payment Form

### 1. Add a New Form

* Go to **Modem Pay Forms → Add New**
* Fill in the details:

| Field               | Description                              |
| ------------------- | ---------------------------------------- |
| **Title**           | Descriptive name (e.g., “Event Payment”) |
| **Amount**          | Fixed or dynamic                         |
| **Redirect URL**    | Optional success page                    |
| **Custom Fields**   | Extra inputs if needed                   |
| **Pay Button Text** | Button label                             |
| **Success Message** | Shown after payment                      |

Click **Publish** when done.

<img src="https://mintcdn.com/modem/yM7VtPyYTpEqFm00/images/payment-form-page.png?fit=max&auto=format&n=yM7VtPyYTpEqFm00&q=85&s=dd8fa23629cabc3ed63d304a799de379" alt="Add Payment Form Page" width="1920" height="1084" data-path="images/payment-form-page.png" />

## 🧩 Embedding the Payment Form

Add your payment form anywhere using a shortcode.

```bash shortcode theme={null}
[modem_pay_payment_page id=1]
```

<img src="https://mintcdn.com/modem/yM7VtPyYTpEqFm00/images/payment-preview.png?fit=max&auto=format&n=yM7VtPyYTpEqFm00&q=85&s=61d883caeb4c595494c76d343f38824a" alt="Checkout preview" width="666" height="678" data-path="images/payment-preview.png" />

For more information and advanced documentation, visit the [Modem Pay WordPress Plugin repository](https://github.com/chibuike-okpara/modem-pay-wordpress-plugin).
