> For the complete documentation index, see [llms.txt](https://docs.anedot.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.anedot.com/integrations/ecommerce-financial-membership/memberpress.md).

# MemberPress

MemberPress is a powerful WordPress plugin designed to help you monetize your website by creating a membership site, controlling access to your content.

**MemberPress** is a powerful WordPress plugin designed to help you monetize your website by creating a membership site, controlling access to your content, and selling online courses or digital products.

## Connecting Anedot to MemberPress

1. In your Anedot account, navigate to **Settings → Integrations → Directory**.
2. Click the blue **+ New Connection** button in the top-right corner.
3. From the integration directory, choose **MemberPress**.
4. Configure Action Pages.
   * **Default:** All Action Pages are connected by default.
   * **Optional:** To connect specific pages only, input a comma-separated list of the **Action Page IDs** you want to include.
5. *Optionally*, limit the integration to send only Team-specific data to MemberPress.
6. Enter WordPress Credentials.
   * **Domain:** Your WordPress site domain
   * **Username:** The WordPress username for the integration
   * **Application Password:** The application-specific password generated for the above user
   * To generate an Application Password: Log in to your WordPress dashboard and go to `https://[yourdomain]/wp-admin/users.php`. Ensure the password matches the username entered above.
7. Click **Save** to complete the setup.

*You can update the connected Action Pages, Team restrictions, or credentials at any time after the integration is established.*

## Data Relays

Anedot supports data relays from **Donation Pages** and **Lead Pages** to MemberPress:

* **Member Lookup:** Each submission attempts to locate a member in MemberPress by email. If a match is found, no further action is taken. If no match is found, a new contact is created.
* **Donation Submissions:** Include a **Transaction Relay**. Add a **Custom Hidden Field** named `membership_id` to the Action Page; the value must match the membership ID in WordPress (via URL Parameters, Page-Specific Values, or Global Values).
* **Note:** Anedot does not relay other custom fields to MemberPress.
* **Push Unsent:** You can manually push unsent or failed donations and filter by date range for all Action Pages.

## Field Mapping

### Member Relay

| Anedot Field           | MemberPress Field |
| ---------------------- | ----------------- |
| address {postal\_code} | zip               |
| address {city}         | city              |
| email                  | email             |
| address {region}       | state             |
| address {country}      | country           |
| address {line1}        | address1          |
| address {line2}        | address2          |
| email                  | username          |
| lastName               | last\_name        |
| firstName              | first\_name       |

### Transaction Relay

| Anedot Field                    | MemberPress Field |
| ------------------------------- | ----------------- |
| total\_amount                   | total             |
| total\_amount                   | amount            |
| id (from Member Response Relay) | member            |
| "complete"                      | status            |
| "manual"                        | gateway           |
| (Submission) id                 | trans\_num        |
| created\_at                     | created\_at       |
| membership\_id\*                | membership        |

> *\* A custom hidden field that must be added to the Anedot Action Page in order to relay transaction fields.*

## Payload Data

### Request Body (Create Member)

```json
{"zip":"70112","city":"New Orleans","email":"admin@anedot.com","state":"LA","country":"US","address1":"1340 Poydras Street","address2":"Suite 1770","username":"admin@anedot.com","last_name":"Dot","first_name":"Annie"}
```

### Request Body (Transaction)

```json
{"total":"50.00","amount":"50.00","member":"123456789","status":"complete","gateway":"manual","trans_num":"87234d0a-b123-4dca-8ee1-6b36d4ab4800","created_at":"2023-08-24 15:01:04","membership":"18"}
```

### Response Status (Success)

```
200
```

### Response Status (Error)

```
500
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.anedot.com/integrations/ecommerce-financial-membership/memberpress.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
