WordPress plugin that exposes protected REST API endpoints for ARMember payment logs, admin-triggered member activation, and guarded member deletion.
Current version: 1.1.0
- Copy this plugin to your WordPress plugins folder.
- Activate Bono API for ARMember.
- Go to Settings -> Bono ARM API.
- Enable List of Transactions.
- Create a WordPress Application Password for an administrator user.
- Call the endpoint:
curl -u your_username:your_app_password \
"https://your-site.com/wp-json/bono_armember/v1/arm_payments_log?arm_invoice_id_gt=1450"- Dedicated endpoint:
GET /wp-json/bono_armember/v1/arm_payments_log - Dedicated endpoint:
POST /wp-json/bono_armember/v1/members/{user_id}/activate - Dedicated endpoint:
POST /wp-json/bono_armember/v1/members/{user_id}/delete - Checked-in API specs under
docs/for OpenAPI 3.1 and Postman - Filters by invoice threshold and ARMember plan
- Pagination support for large transaction sets
- Optional member activation email dispatch through ARMember
- Guarded member deletion through
wp_delete_user()with ARMember cleanup lifecycle preservation - Returns only successful ARMember transactions
- Access restricted to administrator users
- Endpoint can be enabled/disabled from plugin settings
- Compatible with WordPress Application Passwords
- WordPress
5.0+ - ARMember plugin installed and active
- HTTPS-enabled site (recommended for secure API auth)
If ARMember is unavailable, the endpoint returns status: 0 with a dependency message instead of querying missing tables.
- Upload the plugin folder to
/wp-content/plugins/. - Activate it from Plugins in wp-admin.
- Open Settings -> Bono ARM API.
- Enable the List of Transactions option.
- Enable Activate Member if you want to expose the activation route.
- Enable Delete Member if you want to expose the deletion route.
- Install Git Updater if you want this site to track GitHub releases, which is the primary distribution channel for this plugin.
Build an installable plugin zip from the repo root:
./build.shThat creates a Git Updater-compatible release asset like bono_arm_api-x.y.z.zip, containing the installable plugin folder bono_arm_api/.
Checked-in API artifacts are available in the plugin and repo under:
docs/bono-arm-api-openapi.jsondocs/bono-arm-api-postman-collection.json
The settings page exposes both files in the API Specs tab, along with the current site REST root to use as the Postman baseUrl.
To prepare a tagged release from the command line:
./release.sh x.y.zThat script:
- updates the plugin header version in
bono-arm-api.php - updates
BONO_ARM_API_VERSION - updates the
Stable taginreadme.txt - commits the version bump
- creates and pushes the git tag
vx.y.z - verifies that all version references match
- requires
release-notes/x.y.z.mdwith the standard release-note headings
Pushing the tag triggers GitHub Actions, which runs ./build.sh, creates or updates the GitHub Release using the checked-in release notes file, and uploads the generated zip asset automatically.
This endpoint requires WordPress authentication and checks for the administrator role.
Recommended method: Application Passwords.
- Go to Users -> Profile.
- In Application Passwords, create a new password.
- Use
username:application_passwordin Basic Auth.
Example:
curl -u your_username:your_app_password \
"https://your-site.com/wp-json/bono_armember/v1/arm_payments_log?arm_invoice_id_gt=1450&arm_page=1&arm_perpage=50"GET /wp-json/bono_armember/v1/arm_payments_log
| Name | Type | Required | Description |
|---|---|---|---|
arm_invoice_id_gt |
integer | Yes | Return records where invoice ID is greater than this value |
arm_plan_id |
integer | No | Filter by ARMember plan ID |
arm_page |
integer | No | Page number (default: 1) |
arm_perpage |
integer | No | Items per page (default: 50, maximum: 100) |
https://your-site.com/wp-json/bono_armember/v1/arm_payments_log?arm_invoice_id_gt=1450&arm_plan_id=2&arm_page=2&arm_perpage=25
{
"status": 1,
"message": "Successfully response result.",
"response": {
"result": {
"payments": [
{
"id": 123,
"arm_log_id": 4567,
"username": "john_doe",
"arm_payer_email": "john@example.com",
"arm_paid_amount": "USD 49.00",
"arm_payment_gateway": "stripe",
"arm_payment_date": "2025-05-01T10:20:30+00:00",
"notes": "",
"arm_transaction_status": "success"
}
],
"pagination": {
"page": 2,
"per_page": 25,
"total_count": 340,
"total_pages": 14
}
}
}
}POST /wp-json/bono_armember/v1/members/{user_id}/activate
Optional JSON body:
| Name | Type | Required | Description |
|---|---|---|---|
send_email |
boolean | No | Send ARMember's manual activation email after the member is activated |
Example request:
curl -u your_username:your_app_password \
-X POST \
-H "Content-Type: application/json" \
-d '{"send_email":true}' \
"https://your-site.com/wp-json/bono_armember/v1/members/123/activate"Example success response:
{
"status": 1,
"message": "Member activated successfully.",
"response": {
"result": {
"user_id": 123,
"primary_status": 1,
"secondary_status": 0,
"email_sent": true
}
}
}POST /wp-json/bono_armember/v1/members/{user_id}/delete
No request body is required.
Example request:
curl -u your_username:your_app_password \
-X POST \
"https://your-site.com/wp-json/bono_armember/v1/members/123/delete"Behavior:
- requires administrator authentication
- requires the member delete endpoint toggle to be enabled in plugin settings
- currently supports single-site installs only
- uses
wp_delete_user()as the primary deletion path - relies on ARMember's
delete_useranddeleted_userlifecycle when available - falls back to ARMember's explicit pre/post-delete methods only when those methods are loaded but the hooks are not attached
Example success response:
{
"status": 1,
"message": "Member deleted successfully.",
"response": {
"result": {
"user_id": 123,
"user_login": "membername",
"user_email": "member@example.com",
"cleanup_mode": "automatic_hooks"
}
}
}- Endpoint disabled in settings:
{
"status": 0,
"message": "API route not enabled, check your settings",
"response": {
"result": []
}
}- Missing required parameter:
{
"status": 0,
"message": "Missing parameter(s): arm_invoice_id_gt",
"response": {
"result": []
}
}- ARMember unavailable:
{
"status": 0,
"message": "ARMember payment tables are not available. Ensure ARMember is installed and active.",
"response": {
"result": []
}
}This plugin is compatible with Git Updater.
The intended distribution model is dual-channel:
- GitHub releases are the primary install and update path for sites running Git Updater.
- WordPress.org is the secondary channel when that listing is available.
Install Git Updater to receive update notifications and one-click updates from this repository.
readme.txtkeeps theStable tagversion- GitHub Actions can tag releases from
main - Tagged versions build a plugin zip release asset
Licensed under GPL-2.0-or-later.