Overview
General
Subscriptions
- Get Subscriptions
- Get Subscription
- Create Subscription
- Update Subscription
- Delete Subscription
- Cancel Subscription
- Expire Subscription
Members
Rules
Memberships
Coupons
Transactions
- Get Transactions
- Get Transaction
- Create Transaction
- Update Transaction
- Delete Transaction
- Refund Transaction
- Refund & Cancel Transaction
Me
Description
Test MemberPress REST endpoint Authentication. Returns a status of 200 on success and 401 on failure.
Search Arguments
None
Update Arguments
None
Sample Request
$ curl "http://yourdoamin.com/wp-json/mp/v1/me" \ -H "MEMBERPRESS-API-KEY: API-KEY-HERE" \
Sample Response
{ "success": true, "data": { "username": "username" } }
Webhooks Subscribe
Description
Subscribe to any or all of MemberPress Developer Tools webhook(s). Returns a 409 Error on failure.
Search Arguments
None
Update Arguments
url (Required) (string) – The url where the webhook will send the request.
event (Required) (string) – The Webhook will be triggered by and send data for this Event.
Sample Request
$ curl -X POST ""http://http://yourdomain.com/wp-json/mp/v1/webhooks/subscribe" \ -H "MEMBERPRESS-API-KEY: API-KEY-HERE" \ -d url="https://example.com" \ -d event="transaction-completed"
Sample Response
{ "success": true, "data": { "id": 1324 } }
Webhooks Unsubscribe
Description
Unsubscribe from any webhook. Returns a 409 Error on failure.
Search Arguments
None
Update Arguments
None
Sample Request
$ curl -X DELETE "http://yourdomain.com/wp-json/mp/v1/webhooks/unsubscribe/:id" \ -H "MEMBERPRESS-API-KEY: API-KEY-HERE" \
Sample Response
{ "success": true }
Get Subscriptions
Description
Get all Subscriptions based on the search arguments provided.
Search Arguments
page (integer, default value: 1) – Current page of the collection.
per_page (integer, default value: 10) – Maximum number of items to be returned in result set.
search (string) – Limit results to those matching a string.
member (integer) – Limit results to subscriptions of a specific member.
membership (integer) – Limit results to subscriptions for a specific membership.
coupon (integer) – Limit results to subscriptions created with a specific coupon.
Update Arguments
None
Sample Request
$ curl "http://yourdomain.com/wp-json/mp/v1/subscriptions?page=2&per_page=10" \ -H "MEMBERPRESS-API-KEY: API-KEY-HERE" \
Sample Response
[ { "coupon": false, "membership": { "id": 15, "title": "Gold Membership", "content": "", "excerpt": "", "date": "2018-08-30 16:10:22", "status": "publish", "author": "2", "date_gmt": "2018-08-30 16:10:22", "modified": "2019-04-01 15:03:22", "modified_gmt": "2019-04-01 21:03:22", "group": "17", "price": "100.00", "period": "1", "period_type": "months", "signup_button_text": "Sign Up", "limit_cycles": false, "limit_cycles_num": "2", "limit_cycles_action": "expire", "trial": false, "trial_days": "0", "trial_amount": "0.00", "trial_once": "1", "group_order": "2", "is_highlighted": false, "plan_code": "", "pricing_title": "Gold Membership", "pricing_show_price": true, "pricing_display": "custom", "custom_price": "Pricing", "pricing_heading_txt": "", "pricing_footer_txt": "", "pricing_button_txt": "Sign Up", "pricing_button_position": "footer", "pricing_benefits": [ "" ], "register_price_action": "default", "register_price": "This is a test", "thank_you_page_enabled": false, "thank_you_page_type": "message", "thank_you_message": "", "thank_you_page_id": "0", "custom_login_urls_enabled": false, "custom_login_urls_default": "", "custom_login_urls": [], "expire_type": "none", "expire_after": "1", "expire_unit": "days", "expire_fixed": "2019-04-01", "tax_exempt": false, "allow_renewal": false, "access_url": "", "disable_address_fields": false, "simultaneous_subscriptions": "1", "use_custom_template": false, "custom_template": "template-sitemap.php", "customize_payment_methods": "1", "custom_payment_methods": [ "peum51-1tc" ], "customize_profile_fields": false, "custom_profile_fields": [], "cannot_purchase_message": "You don't have access to purchase this item." }, "member": { "id": 56, "email": "zapier@test.com", "username": "zapiertest", "nicename": "zapiertest", "url": "", "message": "", "registered_at": "2019-04-18 16:47:14", "first_name": "zapier", "last_name": "test", "display_name": "zapiertest" }, "id": "69", "subscr_id": "cus_EuSIHGllVD3168", "gateway": { "name": "Stripe", "label": "My Stripe gateway", "use_label": true, "icon": "http://yourdomain.com/wp-content/plugins/memberpress/images/checkout/cards.png", "use_icon": true, "desc": "Pay with your credit card via Stripe", "use_desc": true, "id": "peum51-1tc", "has_spc_form": true, "settings": { "gateway": "MeprStripeGateway", "id": "peum51-1tc", "label": "My Stripe gateway", "use_label": true, "use_icon": true, "use_desc": true, "email": "", "sandbox": false, "force_ssl": false, "debug": false, "test_mode": "on", "use_stripe_checkout": false, "churn_buster_enabled": false, "churn_buster_uuid": "", "api_keys": { "test": { "public": "pk_test_99NqpKsIsKWcjE2cgvKViV99", "secret": "sk_test_99WXy9TgeQGH47NMkNSnSd99" }, "live": { "public": "", "secret": "" } }, "saved": "1", "public_key": "pk_test_99NqpKsIsKWcjE2cgvKViV99", "secret_key": "sk_test_99WXy9TgeQGH47NMkNSnSd99" }, "capabilities": [ "process-credit-cards", "process-payments", "process-refunds", "create-subscriptions", "cancel-subscriptions", "update-subscriptions", "suspend-subscriptions", "resume-subscriptions", "send-cc-expirations" ] }, "price": "100.00", "period": "1", "period_type": "months", "limit_cycles": "0", "limit_cycles_num": "2", "limit_cycles_action": "expire", "prorated_trial": "0", "trial": "0", "trial_days": "0", "trial_amount": "0.00", "status": "active", "created_at": "2019-04-18 16:47:19", "total": "100.00", "tax_rate": "0.000", "tax_amount": "0.00", "tax_desc": "", "tax_class": "standard", "cc_last4": "1111", "cc_exp_month": "10", "cc_exp_year": "2020", "token": "", "tax_compound": "0", "tax_shipping": "1", "response": null }, { "coupon": false, "membership": { "id": 15, "title": "Gold Membership", "content": "", "excerpt": "", "date": "2018-08-30 16:10:22", "status": "publish", "author": "2", "date_gmt": "2018-08-30 16:10:22", "modified": "2019-04-01 15:03:22", "modified_gmt": "2019-04-01 21:03:22", "group": "17", "price": "100.00", "period": "1", "period_type": "months", "signup_button_text": "Sign Up", "limit_cycles": false, "limit_cycles_num": "2", "limit_cycles_action": "expire", "trial": false, "trial_days": "0", "trial_amount": "0.00", "trial_once": "1", "group_order": "2", "is_highlighted": false, "plan_code": "", "pricing_title": "Gold Membership", "pricing_show_price": true, "pricing_display": "custom", "custom_price": "Pricing", "pricing_heading_txt": "", "pricing_footer_txt": "", "pricing_button_txt": "Sign Up", "pricing_button_position": "footer", "pricing_benefits": [ "" ], "register_price_action": "default", "register_price": "This is a test", "thank_you_page_enabled": false, "thank_you_page_type": "message", "thank_you_message": "", "thank_you_page_id": "0", "custom_login_urls_enabled": false, "custom_login_urls_default": "", "custom_login_urls": [], "expire_type": "none", "expire_after": "1", "expire_unit": "days", "expire_fixed": "2019-04-01", "tax_exempt": false, "allow_renewal": false, "access_url": "", "disable_address_fields": false, "simultaneous_subscriptions": "1", "use_custom_template": false, "custom_template": "template-sitemap.php", "customize_payment_methods": "1", "custom_payment_methods": [ "peum51-1tc" ], "customize_profile_fields": false, "custom_profile_fields": [], "cannot_purchase_message": "You don't have access to purchase this item." }, "member": { "id": 54, "email": "buddy@test2.com", "username": "buddy@test2.com", "nicename": "buddytest2-com", "url": "", "message": "", "registered_at": "2019-04-03 19:42:37", "first_name": "", "last_name": "", "display_name": "buddy@test2.com" }, "id": "67", "subscr_id": "cus_EoskD8WRM2bxrG", "gateway": { "name": "Stripe", "label": "My Stripe gateway", "use_label": true, "icon": "http://yourdomain.com/wp-content/plugins/memberpress/images/checkout/cards.png", "use_icon": true, "desc": "Pay with your credit card via Stripe", "use_desc": true, "id": "peum51-1tc", "has_spc_form": true, "settings": { "gateway": "MeprStripeGateway", "id": "peum51-1tc", "label": "My Stripe gateway", "use_label": true, "use_icon": true, "use_desc": true, "email": "", "sandbox": false, "force_ssl": false, "debug": false, "test_mode": "on", "use_stripe_checkout": false, "churn_buster_enabled": false, "churn_buster_uuid": "", "api_keys": { "test": { "public": "pk_test_99NqpKsIsKWcjE2cgvKViV99", "secret": "sk_test_99WXy9TgeQGH47NMkNSnSd99" }, "live": { "public": "", "secret": "" } }, "saved": "1", "public_key": "pk_test_99NqpKsIsKWcjE2cgvKViV99", "secret_key": "sk_test_99WXy9TgeQGH47NMkNSnSd99" }, "capabilities": [ "process-credit-cards", "process-payments", "process-refunds", "create-subscriptions", "cancel-subscriptions", "update-subscriptions", "suspend-subscriptions", "resume-subscriptions", "send-cc-expirations" ] }, "price": "100.00", "period": "1", "period_type": "months", "limit_cycles": "0", "limit_cycles_num": "2", "limit_cycles_action": "expire", "prorated_trial": "0", "trial": "0", "trial_days": "0", "trial_amount": "0.00", "status": "active", "created_at": "2019-04-03 19:42:44", "total": "100.00", "tax_rate": "0.000", "tax_amount": "0.00", "tax_desc": "", "tax_class": "standard", "cc_last4": "1111", "cc_exp_month": "10", "cc_exp_year": "2020", "token": "", "tax_compound": "0", "tax_shipping": "1", "response": null }, { "coupon": false, "membership": { "id": 267, "title": "coupon testing", "content": "", "excerpt": "", "date": "2019-04-03 11:18:41", "status": "publish", "author": "5", "date_gmt": "2019-04-03 17:18:41", "modified": "2019-04-04 10:58:44", "modified_gmt": "2019-04-04 16:58:44", "group": "0", "price": "9.99", "period": "1", "period_type": "months", "signup_button_text": "Sign Up", "limit_cycles": false, "limit_cycles_num": "2", "limit_cycles_action": "expire", "trial": "1", "trial_days": "90", "trial_amount": "29.94", "trial_once": "1", "group_order": "0", "is_highlighted": false, "plan_code": "", "pricing_title": "coupon testing", "pricing_show_price": true, "pricing_display": "auto", "custom_price": "", "pricing_heading_txt": "", "pricing_footer_txt": "", "pricing_button_txt": "Sign Up", "pricing_button_position": "footer", "pricing_benefits": [ "" ], "register_price_action": "default", "register_price": "", "thank_you_page_enabled": false, "thank_you_page_type": "message", "thank_you_message": "", "thank_you_page_id": "0", "custom_login_urls_enabled": false, "custom_login_urls_default": "", "custom_login_urls": [], "expire_type": "none", "expire_after": "1", "expire_unit": "days", "expire_fixed": "2019-04-04", "tax_exempt": false, "allow_renewal": false, "access_url": "", "disable_address_fields": false, "simultaneous_subscriptions": false, "use_custom_template": false, "custom_template": "template-sitemap.php", "customize_payment_methods": false, "custom_payment_methods": [], "customize_profile_fields": false, "custom_profile_fields": [], "cannot_purchase_message": "You don't have access to purchase this item." }, "member": { "id": 51, "email": "coupon@testing4.com", "username": "coupon@testing4.com", "nicename": "coupontesting4-com", "url": "", "message": "", "registered_at": "2019-04-03 18:01:05", "first_name": "coupon", "last_name": "testing4", "display_name": "coupon testing4" }, "id": "64", "subscr_id": "cus_Eor77sLgMt4sIg", "gateway": { "name": "Stripe", "label": "My Stripe gateway", "use_label": true, "icon": "http://yourdomain.com/wp-content/plugins/memberpress/images/checkout/cards.png", "use_icon": true, "desc": "Pay with your credit card via Stripe", "use_desc": true, "id": "peum51-1tc", "has_spc_form": true, "settings": { "gateway": "MeprStripeGateway", "id": "peum51-1tc", "label": "My Stripe gateway", "use_label": true, "use_icon": true, "use_desc": true, "email": "", "sandbox": false, "force_ssl": false, "debug": false, "test_mode": "on", "use_stripe_checkout": false, "churn_buster_enabled": false, "churn_buster_uuid": "", "api_keys": { "test": { "public": "pk_test_99NqpKsIsKWcjE2cgvKViV99", "secret": "sk_test_99WXy9TgeQGH47NMkNSnSd99" }, "live": { "public": "", "secret": "" } }, "saved": "1", "public_key": "pk_test_99NqpKsIsKWcjE2cgvKViV99", "secret_key": "sk_test_99WXy9TgeQGH47NMkNSnSd99" }, "capabilities": [ "process-credit-cards", "process-payments", "process-refunds", "create-subscriptions", "cancel-subscriptions", "update-subscriptions", "suspend-subscriptions", "resume-subscriptions", "send-cc-expirations" ] }, "price": "9.99", "period": "1", "period_type": "months", "limit_cycles": "0", "limit_cycles_num": "2", "limit_cycles_action": "expire", "prorated_trial": "0", "trial": "1", "trial_days": "90", "trial_amount": "29.94", "status": "active", "created_at": "2019-04-03 18:01:29", "total": "9.99", "tax_rate": "0.000", "tax_amount": "0.00", "tax_desc": "", "tax_class": "standard", "cc_last4": "1111", "cc_exp_month": "10", "cc_exp_year": "2020", "token": "", "tax_compound": "0", "tax_shipping": "1", "response": null }, { "coupon": { "id": 268, "coupon_code": "3ITYMDZOI5", "date": "2019-04-03 11:19:30", "status": "publish", "author": "5", "date_gmt": "2019-04-03 17:19:30", "modified": "2019-04-03 11:53:48", "modified_gmt": "2019-04-03 17:53:48", "valid_memberships": [ "267" ], "should_expire": false, "expires_on": "0", "usage_count": "2", "usage_amount": "0", "discount_type": "percent", "discount_amount": "100", "discount_mode": "first-payment", "trial_days": "0", "trial_amount": "0.00" }, "membership": { "id": 267, "title": "coupon testing", "content": "", "excerpt": "", "date": "2019-04-03 11:18:41", "status": "publish", "author": "5", "date_gmt": "2019-04-03 17:18:41", "modified": "2019-04-04 10:58:44", "modified_gmt": "2019-04-04 16:58:44", "group": "0", "price": "9.99", "period": "1", "period_type": "months", "signup_button_text": "Sign Up", "limit_cycles": false, "limit_cycles_num": "2", "limit_cycles_action": "expire", "trial": "1", "trial_days": "90", "trial_amount": "29.94", "trial_once": "1", "group_order": "0", "is_highlighted": false, "plan_code": "", "pricing_title": "coupon testing", "pricing_show_price": true, "pricing_display": "auto", "custom_price": "", "pricing_heading_txt": "", "pricing_footer_txt": "", "pricing_button_txt": "Sign Up", "pricing_button_position": "footer", "pricing_benefits": [ "" ], "register_price_action": "default", "register_price": "", "thank_you_page_enabled": false, "thank_you_page_type": "message", "thank_you_message": "", "thank_you_page_id": "0", "custom_login_urls_enabled": false, "custom_login_urls_default": "", "custom_login_urls": [], "expire_type": "none", "expire_after": "1", "expire_unit": "days", "expire_fixed": "2019-04-04", "tax_exempt": false, "allow_renewal": false, "access_url": "", "disable_address_fields": false, "simultaneous_subscriptions": false, "use_custom_template": false, "custom_template": "template-sitemap.php", "customize_payment_methods": false, "custom_payment_methods": [], "customize_profile_fields": false, "custom_profile_fields": [], "cannot_purchase_message": "You don't have access to purchase this item." }, "member": { "id": 50, "email": "coupon@testing3.com", "username": "coupon@testing3.com", "nicename": "coupontesting3-com", "url": "", "message": "", "registered_at": "2019-04-03 17:53:28", "first_name": "coupon", "last_name": "testing3", "display_name": "coupon testing3" }, "id": "63", "subscr_id": "cus_EoqzWnn2NY7UGL", "gateway": { "name": "Stripe", "label": "My Stripe gateway", "use_label": true, "icon": "http://yourdomain.com/wp-content/plugins/memberpress/images/checkout/cards.png", "use_icon": true, "desc": "Pay with your credit card via Stripe", "use_desc": true, "id": "peum51-1tc", "has_spc_form": true, "settings": { "gateway": "MeprStripeGateway", "id": "peum51-1tc", "label": "My Stripe gateway", "use_label": true, "use_icon": true, "use_desc": true, "email": "", "sandbox": false, "force_ssl": false, "debug": false, "test_mode": "on", "use_stripe_checkout": false, "churn_buster_enabled": false, "churn_buster_uuid": "", "api_keys": { "test": { "public": "pk_test_99NqpKsIsKWcjE2cgvKViV99", "secret": "sk_test_99WXy9TgeQGH47NMkNSnSd99" }, "live": { "public": "", "secret": "" } }, "saved": "1", "public_key": "pk_test_99NqpKsIsKWcjE2cgvKViV99", "secret_key": "sk_test_99WXy9TgeQGH47NMkNSnSd99" }, "capabilities": [ "process-credit-cards", "process-payments", "process-refunds", "create-subscriptions", "cancel-subscriptions", "update-subscriptions", "suspend-subscriptions", "resume-subscriptions", "send-cc-expirations" ] }, "price": "9.99", "period": "1", "period_type": "months", "limit_cycles": "0", "limit_cycles_num": "2", "limit_cycles_action": "expire", "prorated_trial": "0", "trial": "1", "trial_days": "30", "trial_amount": "0.00", "status": "active", "created_at": "2019-04-03 17:53:48", "total": "9.99", "tax_rate": "0.000", "tax_amount": "0.00", "tax_desc": "", "tax_class": "standard", "cc_last4": "1111", "cc_exp_month": "10", "cc_exp_year": "2020", "token": "", "tax_compound": "0", "tax_shipping": "1", "response": null }, { "coupon": false, "membership": { "id": 267, "title": "coupon testing", "content": "", "excerpt": "", "date": "2019-04-03 11:18:41", "status": "publish", "author": "5", "date_gmt": "2019-04-03 17:18:41", "modified": "2019-04-04 10:58:44", "modified_gmt": "2019-04-04 16:58:44", "group": "0", "price": "9.99", "period": "1", "period_type": "months", "signup_button_text": "Sign Up", "limit_cycles": false, "limit_cycles_num": "2", "limit_cycles_action": "expire", "trial": "1", "trial_days": "90", "trial_amount": "29.94", "trial_once": "1", "group_order": "0", "is_highlighted": false, "plan_code": "", "pricing_title": "coupon testing", "pricing_show_price": true, "pricing_display": "auto", "custom_price": "", "pricing_heading_txt": "", "pricing_footer_txt": "", "pricing_button_txt": "Sign Up", "pricing_button_position": "footer", "pricing_benefits": [ "" ], "register_price_action": "default", "register_price": "", "thank_you_page_enabled": false, "thank_you_page_type": "message", "thank_you_message": "", "thank_you_page_id": "0", "custom_login_urls_enabled": false, "custom_login_urls_default": "", "custom_login_urls": [], "expire_type": "none", "expire_after": "1", "expire_unit": "days", "expire_fixed": "2019-04-04", "tax_exempt": false, "allow_renewal": false, "access_url": "", "disable_address_fields": false, "simultaneous_subscriptions": false, "use_custom_template": false, "custom_template": "template-sitemap.php", "customize_payment_methods": false, "custom_payment_methods": [], "customize_profile_fields": false, "custom_profile_fields": [], "cannot_purchase_message": "You don't have access to purchase this item." }, "member": { "id": 49, "email": "coupon@testing2.com", "username": "coupon@testing2.com", "nicename": "coupontesting2-com", "url": "", "message": "", "registered_at": "2019-04-03 17:33:06", "first_name": "coupon", "last_name": "testing2", "display_name": "coupon testing2" }, "id": "62", "subscr_id": "cus_EoqfMhbLzIxdXZ", "gateway": { "name": "Stripe", "label": "My Stripe gateway", "use_label": true, "icon": "http://yourdomain.com/wp-content/plugins/memberpress/images/checkout/cards.png", "use_icon": true, "desc": "Pay with your credit card via Stripe", "use_desc": true, "id": "peum51-1tc", "has_spc_form": true, "settings": { "gateway": "MeprStripeGateway", "id": "peum51-1tc", "label": "My Stripe gateway", "use_label": true, "use_icon": true, "use_desc": true, "email": "", "sandbox": false, "force_ssl": false, "debug": false, "test_mode": "on", "use_stripe_checkout": false, "churn_buster_enabled": false, "churn_buster_uuid": "", "api_keys": { "test": { "public": "pk_test_99NqpKsIsKWcjE2cgvKViV99", "secret": "sk_test_99WXy9TgeQGH47NMkNSnSd99" }, "live": { "public": "", "secret": "" } }, "saved": "1", "public_key": "pk_test_99NqpKsIsKWcjE2cgvKViV99", "secret_key": "sk_test_99WXy9TgeQGH47NMkNSnSd99" }, "capabilities": [ "process-credit-cards", "process-payments", "process-refunds", "create-subscriptions", "cancel-subscriptions", "update-subscriptions", "suspend-subscriptions", "resume-subscriptions", "send-cc-expirations" ] }, "price": "9.99", "period": "1", "period_type": "months", "limit_cycles": "0", "limit_cycles_num": "2", "limit_cycles_action": "expire", "prorated_trial": "0", "trial": "1", "trial_days": "90", "trial_amount": "29.94", "status": "active", "created_at": "2019-04-03 17:33:31", "total": "9.99", "tax_rate": "0.000", "tax_amount": "0.00", "tax_desc": "", "tax_class": "standard", "cc_last4": "1111", "cc_exp_month": "10", "cc_exp_year": "2020", "token": "", "tax_compound": "0", "tax_shipping": "1", "response": null }, { "coupon": { "id": 268, "coupon_code": "3ITYMDZOI5", "date": "2019-04-03 11:19:30", "status": "publish", "author": "5", "date_gmt": "2019-04-03 17:19:30", "modified": "2019-04-03 11:53:48", "modified_gmt": "2019-04-03 17:53:48", "valid_memberships": [ "267" ], "should_expire": false, "expires_on": "0", "usage_count": "2", "usage_amount": "0", "discount_type": "percent", "discount_amount": "100", "discount_mode": "first-payment", "trial_days": "0", "trial_amount": "0.00" }, "membership": { "id": 267, "title": "coupon testing", "content": "", "excerpt": "", "date": "2019-04-03 11:18:41", "status": "publish", "author": "5", "date_gmt": "2019-04-03 17:18:41", "modified": "2019-04-04 10:58:44", "modified_gmt": "2019-04-04 16:58:44", "group": "0", "price": "9.99", "period": "1", "period_type": "months", "signup_button_text": "Sign Up", "limit_cycles": false, "limit_cycles_num": "2", "limit_cycles_action": "expire", "trial": "1", "trial_days": "90", "trial_amount": "29.94", "trial_once": "1", "group_order": "0", "is_highlighted": false, "plan_code": "", "pricing_title": "coupon testing", "pricing_show_price": true, "pricing_display": "auto", "custom_price": "", "pricing_heading_txt": "", "pricing_footer_txt": "", "pricing_button_txt": "Sign Up", "pricing_button_position": "footer", "pricing_benefits": [ "" ], "register_price_action": "default", "register_price": "", "thank_you_page_enabled": false, "thank_you_page_type": "message", "thank_you_message": "", "thank_you_page_id": "0", "custom_login_urls_enabled": false, "custom_login_urls_default": "", "custom_login_urls": [], "expire_type": "none", "expire_after": "1", "expire_unit": "days", "expire_fixed": "2019-04-04", "tax_exempt": false, "allow_renewal": false, "access_url": "", "disable_address_fields": false, "simultaneous_subscriptions": false, "use_custom_template": false, "custom_template": "template-sitemap.php", "customize_payment_methods": false, "custom_payment_methods": [], "customize_profile_fields": false, "custom_profile_fields": [], "cannot_purchase_message": "You don't have access to purchase this item." }, "member": { "id": 48, "email": "coupon@testing.com", "username": "coupon@testing.com", "nicename": "coupontesting-com", "url": "", "message": "", "registered_at": "2019-04-03 17:21:50", "first_name": "coupon", "last_name": "testing", "display_name": "coupon testing" }, "id": "61", "subscr_id": "cus_EoqTynS7epcvBN", "gateway": { "name": "Stripe", "label": "My Stripe gateway", "use_label": true, "icon": "http://yourdomain.com/wp-content/plugins/memberpress/images/checkout/cards.png", "use_icon": true, "desc": "Pay with your credit card via Stripe", "use_desc": true, "id": "peum51-1tc", "has_spc_form": true, "settings": { "gateway": "MeprStripeGateway", "id": "peum51-1tc", "label": "My Stripe gateway", "use_label": true, "use_icon": true, "use_desc": true, "email": "", "sandbox": false, "force_ssl": false, "debug": false, "test_mode": "on", "use_stripe_checkout": false, "churn_buster_enabled": false, "churn_buster_uuid": "", "api_keys": { "test": { "public": "pk_test_99NqpKsIsKWcjE2cgvKViV99", "secret": "sk_test_99WXy9TgeQGH47NMkNSnSd99" }, "live": { "public": "", "secret": "" } }, "saved": "1", "public_key": "pk_test_99NqpKsIsKWcjE2cgvKViV99", "secret_key": "sk_test_99WXy9TgeQGH47NMkNSnSd99" }, "capabilities": [ "process-credit-cards", "process-payments", "process-refunds", "create-subscriptions", "cancel-subscriptions", "update-subscriptions", "suspend-subscriptions", "resume-subscriptions", "send-cc-expirations" ] }, "price": "9.99", "period": "1", "period_type": "months", "limit_cycles": "0", "limit_cycles_num": "2", "limit_cycles_action": "expire", "prorated_trial": "0", "trial": "1", "trial_days": "30", "trial_amount": "0.00", "status": "active", "created_at": "2019-04-03 17:21:55", "total": "9.99", "tax_rate": "0.000", "tax_amount": "0.00", "tax_desc": "", "tax_class": "standard", "cc_last4": "1111", "cc_exp_month": "10", "cc_exp_year": "2020", "token": "", "tax_compound": "0", "tax_shipping": "1", "response": null }, { "coupon": false, "membership": { "id": 15, "title": "Gold Membership", "content": "", "excerpt": "", "date": "2018-08-30 16:10:22", "status": "publish", "author": "2", "date_gmt": "2018-08-30 16:10:22", "modified": "2019-04-01 15:03:22", "modified_gmt": "2019-04-01 21:03:22", "group": "17", "price": "100.00", "period": "1", "period_type": "months", "signup_button_text": "Sign Up", "limit_cycles": false, "limit_cycles_num": "2", "limit_cycles_action": "expire", "trial": false, "trial_days": "0", "trial_amount": "0.00", "trial_once": "1", "group_order": "2", "is_highlighted": false, "plan_code": "", "pricing_title": "Gold Membership", "pricing_show_price": true, "pricing_display": "custom", "custom_price": "Pricing", "pricing_heading_txt": "", "pricing_footer_txt": "", "pricing_button_txt": "Sign Up", "pricing_button_position": "footer", "pricing_benefits": [ "" ], "register_price_action": "default", "register_price": "This is a test", "thank_you_page_enabled": false, "thank_you_page_type": "message", "thank_you_message": "", "thank_you_page_id": "0", "custom_login_urls_enabled": false, "custom_login_urls_default": "", "custom_login_urls": [], "expire_type": "none", "expire_after": "1", "expire_unit": "days", "expire_fixed": "2019-04-01", "tax_exempt": false, "allow_renewal": false, "access_url": "", "disable_address_fields": false, "simultaneous_subscriptions": "1", "use_custom_template": false, "custom_template": "template-sitemap.php", "customize_payment_methods": "1", "custom_payment_methods": [ "peum51-1tc" ], "customize_profile_fields": false, "custom_profile_fields": [], "cannot_purchase_message": "You don't have access to purchase this item." }, "member": { "id": 47, "email": "buddy@test.com", "username": "buddy@test.com", "nicename": "buddytest-com", "url": "", "message": "", "registered_at": "2019-04-01 21:03:59", "first_name": "buddy", "last_name": "test", "display_name": "buddy test" }, "id": "60", "subscr_id": "cus_Eo9bZvhtSyBpFV", "gateway": { "name": "Stripe", "label": "My Stripe gateway", "use_label": true, "icon": "http://yourdomain.com/wp-content/plugins/memberpress/images/checkout/cards.png", "use_icon": true, "desc": "Pay with your credit card via Stripe", "use_desc": true, "id": "peum51-1tc", "has_spc_form": true, "settings": { "gateway": "MeprStripeGateway", "id": "peum51-1tc", "label": "My Stripe gateway", "use_label": true, "use_icon": true, "use_desc": true, "email": "", "sandbox": false, "force_ssl": false, "debug": false, "test_mode": "on", "use_stripe_checkout": false, "churn_buster_enabled": false, "churn_buster_uuid": "", "api_keys": { "test": { "public": "pk_test_99NqpKsIsKWcjE2cgvKViV99", "secret": "sk_test_99WXy9TgeQGH47NMkNSnSd99" }, "live": { "public": "", "secret": "" } }, "saved": "1", "public_key": "pk_test_99NqpKsIsKWcjE2cgvKViV99", "secret_key": "sk_test_99WXy9TgeQGH47NMkNSnSd99" }, "capabilities": [ "process-credit-cards", "process-payments", "process-refunds", "create-subscriptions", "cancel-subscriptions", "update-subscriptions", "suspend-subscriptions", "resume-subscriptions", "send-cc-expirations" ] }, "price": "100.00", "period": "1", "period_type": "months", "limit_cycles": "0", "limit_cycles_num": "2", "limit_cycles_action": "expire", "prorated_trial": "0", "trial": "0", "trial_days": "0", "trial_amount": "0.00", "status": "cancelled", "created_at": "2019-04-01 21:04:05", "total": "100.00", "tax_rate": "0.000", "tax_amount": "0.00", "tax_desc": "", "tax_class": "standard", "cc_last4": "1111", "cc_exp_month": "10", "cc_exp_year": "2020", "token": "", "tax_compound": "0", "tax_shipping": "1", "response": null }, { "coupon": false, "membership": { "id": 15, "title": "Gold Membership", "content": "", "excerpt": "", "date": "2018-08-30 16:10:22", "status": "publish", "author": "2", "date_gmt": "2018-08-30 16:10:22", "modified": "2019-04-01 15:03:22", "modified_gmt": "2019-04-01 21:03:22", "group": "17", "price": "100.00", "period": "1", "period_type": "months", "signup_button_text": "Sign Up", "limit_cycles": false, "limit_cycles_num": "2", "limit_cycles_action": "expire", "trial": false, "trial_days": "0", "trial_amount": "0.00", "trial_once": "1", "group_order": "2", "is_highlighted": false, "plan_code": "", "pricing_title": "Gold Membership", "pricing_show_price": true, "pricing_display": "custom", "custom_price": "Pricing", "pricing_heading_txt": "", "pricing_footer_txt": "", "pricing_button_txt": "Sign Up", "pricing_button_position": "footer", "pricing_benefits": [ "" ], "register_price_action": "default", "register_price": "This is a test", "thank_you_page_enabled": false, "thank_you_page_type": "message", "thank_you_message": "", "thank_you_page_id": "0", "custom_login_urls_enabled": false, "custom_login_urls_default": "", "custom_login_urls": [], "expire_type": "none", "expire_after": "1", "expire_unit": "days", "expire_fixed": "2019-04-01", "tax_exempt": false, "allow_renewal": false, "access_url": "", "disable_address_fields": false, "simultaneous_subscriptions": "1", "use_custom_template": false, "custom_template": "template-sitemap.php", "customize_payment_methods": "1", "custom_payment_methods": [ "peum51-1tc" ], "customize_profile_fields": false, "custom_profile_fields": [], "cannot_purchase_message": "You don't have access to purchase this item." }, "member": { "id": 5, "email": "zapier@test2.com", "username": "zapiertest2", "nicename": "zapiertest2", "url": "http://zapier.test2.com", "message": "", "registered_at": "2018-08-30 16:42:13", "first_name": "zapier", "last_name": "test2", "display_name": "zapier test2" }, "id": "58", "subscr_id": "cus_EhmAfr0Y1tbHSL", "gateway": { "name": "Stripe", "label": "My Stripe gateway", "use_label": true, "icon": "http://yourdomain.com/wp-content/plugins/memberpress/images/checkout/cards.png", "use_icon": true, "desc": "Pay with your credit card via Stripe", "use_desc": true, "id": "peum51-1tc", "has_spc_form": true, "settings": { "gateway": "MeprStripeGateway", "id": "peum51-1tc", "label": "My Stripe gateway", "use_label": true, "use_icon": true, "use_desc": true, "email": "", "sandbox": false, "force_ssl": false, "debug": false, "test_mode": "on", "use_stripe_checkout": false, "churn_buster_enabled": false, "churn_buster_uuid": "", "api_keys": { "test": { "public": "pk_test_99NqpKsIsKWcjE2cgvKViV99", "secret": "sk_test_99WXy9TgeQGH47NMkNSnSd99" }, "live": { "public": "", "secret": "" } }, "saved": "1", "public_key": "pk_test_99NqpKsIsKWcjE2cgvKViV99", "secret_key": "sk_test_99WXy9TgeQGH47NMkNSnSd99" }, "capabilities": [ "process-credit-cards", "process-payments", "process-refunds", "create-subscriptions", "cancel-subscriptions", "update-subscriptions", "suspend-subscriptions", "resume-subscriptions", "send-cc-expirations" ] }, "price": "100.00", "period": "1", "period_type": "months", "limit_cycles": "0", "limit_cycles_num": "2", "limit_cycles_action": "expire", "prorated_trial": "0", "trial": "0", "trial_days": "0", "trial_amount": "0.00", "status": "cancelled", "created_at": "2019-03-15 20:26:28", "total": "100.00", "tax_rate": "0.000", "tax_amount": "0.00", "tax_desc": "", "tax_class": "standard", "cc_last4": "1111", "cc_exp_month": "10", "cc_exp_year": "2020", "token": "", "tax_compound": "0", "tax_shipping": "1", "response": null }, { "coupon": false, "membership": { "id": 15, "title": "Gold Membership", "content": "", "excerpt": "", "date": "2018-08-30 16:10:22", "status": "publish", "author": "2", "date_gmt": "2018-08-30 16:10:22", "modified": "2019-04-01 15:03:22", "modified_gmt": "2019-04-01 21:03:22", "group": "17", "price": "100.00", "period": "1", "period_type": "months", "signup_button_text": "Sign Up", "limit_cycles": false, "limit_cycles_num": "2", "limit_cycles_action": "expire", "trial": false, "trial_days": "0", "trial_amount": "0.00", "trial_once": "1", "group_order": "2", "is_highlighted": false, "plan_code": "", "pricing_title": "Gold Membership", "pricing_show_price": true, "pricing_display": "custom", "custom_price": "Pricing", "pricing_heading_txt": "", "pricing_footer_txt": "", "pricing_button_txt": "Sign Up", "pricing_button_position": "footer", "pricing_benefits": [ "" ], "register_price_action": "default", "register_price": "This is a test", "thank_you_page_enabled": false, "thank_you_page_type": "message", "thank_you_message": "", "thank_you_page_id": "0", "custom_login_urls_enabled": false, "custom_login_urls_default": "", "custom_login_urls": [], "expire_type": "none", "expire_after": "1", "expire_unit": "days", "expire_fixed": "2019-04-01", "tax_exempt": false, "allow_renewal": false, "access_url": "", "disable_address_fields": false, "simultaneous_subscriptions": "1", "use_custom_template": false, "custom_template": "template-sitemap.php", "customize_payment_methods": "1", "custom_payment_methods": [ "peum51-1tc" ], "customize_profile_fields": false, "custom_profile_fields": [], "cannot_purchase_message": "You don't have access to purchase this item." }, "member": { "id": 5, "email": "zapier@test.com", "username": "zapiertest", "nicename": "zapiertest", "url": "http://zapier@test.com", "message": "", "registered_at": "2018-08-30 16:42:13", "first_name": "zapier", "last_name": "test", "display_name": "Zapier Test" }, "id": "57", "subscr_id": "mp-sub-5c8aa776bb275", "gateway": { "name": "Stripe", "label": "My Stripe gateway", "use_label": true, "icon": "http://yourdomain.com/wp-content/plugins/memberpress/images/checkout/cards.png", "use_icon": true, "desc": "Pay with your credit card via Stripe", "use_desc": true, "id": "peum51-1tc", "has_spc_form": true, "settings": { "gateway": "MeprStripeGateway", "id": "peum51-1tc", "label": "My Stripe gateway", "use_label": true, "use_icon": true, "use_desc": true, "email": "", "sandbox": false, "force_ssl": false, "debug": false, "test_mode": "on", "use_stripe_checkout": false, "churn_buster_enabled": false, "churn_buster_uuid": "", "api_keys": { "test": { "public": "pk_test_99NqpKsIsKWcjE2cgvKViV99", "secret": "sk_test_99WXy9TgeQGH47NMkNSnSd99" }, "live": { "public": "", "secret": "" } }, "saved": "1", "public_key": "pk_test_99NqpKsIsKWcjE2cgvKViV99", "secret_key": "sk_test_99WXy9TgeQGH47NMkNSnSd99" }, "capabilities": [ "process-credit-cards", "process-payments", "process-refunds", "create-subscriptions", "cancel-subscriptions", "update-subscriptions", "suspend-subscriptions", "resume-subscriptions", "send-cc-expirations" ] }, "price": "100.00", "period": "1", "period_type": "months", "limit_cycles": "0", "limit_cycles_num": "2", "limit_cycles_action": "expire", "prorated_trial": "0", "trial": "0", "trial_days": "0", "trial_amount": "0.00", "status": "pending", "created_at": "2019-03-14 19:11:50", "total": "100.00", "tax_rate": "0.000", "tax_amount": "0.00", "tax_desc": "", "tax_class": "standard", "cc_last4": "", "cc_exp_month": "", "cc_exp_year": "", "token": "", "tax_compound": "0", "tax_shipping": "1", "response": null }, { "coupon": false, "membership": { "id": 250, "title": "25 1", "content": "", "excerpt": "", "date": "2019-03-13 16:20:17", "status": "publish", "author": "5", "date_gmt": "2019-03-13 22:20:17", "modified": "2019-03-13 16:20:17", "modified_gmt": "2019-03-13 22:20:17", "group": "252", "price": "25.00", "period": "1", "period_type": "months", "signup_button_text": "Sign Up", "limit_cycles": false, "limit_cycles_num": "2", "limit_cycles_action": "expire", "trial": false, "trial_days": "0", "trial_amount": "0.00", "trial_once": "1", "group_order": "0", "is_highlighted": false, "plan_code": "", "pricing_title": "25 1", "pricing_show_price": true, "pricing_display": "auto", "custom_price": "", "pricing_heading_txt": "", "pricing_footer_txt": "", "pricing_button_txt": "Sign Up", "pricing_button_position": "footer", "pricing_benefits": [ "" ], "register_price_action": "default", "register_price": "", "thank_you_page_enabled": false, "thank_you_page_type": "message", "thank_you_message": "", "thank_you_page_id": "0", "custom_login_urls_enabled": false, "custom_login_urls_default": "", "custom_login_urls": [], "expire_type": "none", "expire_after": "1", "expire_unit": "days", "expire_fixed": "2019-03-13", "tax_exempt": false, "allow_renewal": false, "access_url": "", "disable_address_fields": false, "simultaneous_subscriptions": false, "use_custom_template": false, "custom_template": "template-sitemap.php", "customize_payment_methods": false, "custom_payment_methods": [], "customize_profile_fields": false, "custom_profile_fields": [], "cannot_purchase_message": "You don't have access to purchase this item." }, "member": { "id": 45, "email": "twenty@five.com", "username": "twenty@five.com", "nicename": "twentyfive-com", "url": "", "message": "", "registered_at": "2019-03-13 22:22:26", "first_name": "", "last_name": "", "display_name": "twenty@five.com" }, "id": "56", "subscr_id": "cus_Eh3a1eXo3TTboZ", "gateway": { "name": "Stripe", "label": "My Stripe gateway", "use_label": true, "icon": "http://yourdomain.comwp-content/plugins/memberpress/images/checkout/cards.png", "use_icon": true, "desc": "Pay with your credit card via Stripe", "use_desc": true, "id": "peum51-1tc", "has_spc_form": true, "settings": { "gateway": "MeprStripeGateway", "id": "peum51-1tc", "label": "My Stripe gateway", "use_label": true, "use_icon": true, "use_desc": true, "email": "", "sandbox": false, "force_ssl": false, "debug": false, "test_mode": "on", "use_stripe_checkout": false, "churn_buster_enabled": false, "churn_buster_uuid": "", "api_keys": { "test": { "public": "pk_test_99NqpKsIsKWcjE2cgvKViV99", "secret": "sk_test_99WXy9TgeQGH47NMkNSnSd99" }, "live": { "public": "", "secret": "" } }, "saved": "1", "public_key": "pk_test_99NqpKsIsKWcjE2cgvKViV99", "secret_key": "sk_test_99WXy9TgeQGH47NMkNSnSd99" }, "capabilities": [ "process-credit-cards", "process-payments", "process-refunds", "create-subscriptions", "cancel-subscriptions", "update-subscriptions", "suspend-subscriptions", "resume-subscriptions", "send-cc-expirations" ] }, "price": "25.00", "period": "1", "period_type": "months", "limit_cycles": "0", "limit_cycles_num": "2", "limit_cycles_action": "expire", "prorated_trial": "0", "trial": "0", "trial_days": "0", "trial_amount": "0.00", "status": "cancelled", "created_at": "2019-03-13 22:22:31", "total": "25.00", "tax_rate": "0.000", "tax_amount": "0.00", "tax_desc": "", "tax_class": "standard", "cc_last4": "1111", "cc_exp_month": "10", "cc_exp_year": "2020", "token": "", "tax_compound": "0", "tax_shipping": "1", "response": null } ]
Get Subscription
Description
Get one Subscription with a given id.
Search Arguments
None
Update Arguments
None
Sample Request
$ curl "http://yourdomain.com/wp-json/mp/v1/subscriptions/59" \ -H "MEMBERPRESS-API-KEY: API-KEY-HERE" \
Sample Response
{ "coupon": false, "membership": { "id": 15, "title": "Gold Membership", "content": "", "excerpt": "", "date": "2018-08-30 16:10:22", "status": "publish", "author": "2", "date_gmt": "2018-08-30 16:10:22", "modified": "2019-03-14 13:10:21", "modified_gmt": "2019-03-14 19:10:21", "group": "17", "price": "100.00", "period": "1", "period_type": "months", "signup_button_text": "Sign Up", "limit_cycles": false, "limit_cycles_num": "2", "limit_cycles_action": "expire", "trial": false, "trial_days": "0", "trial_amount": "0.00", "trial_once": "1", "group_order": "2", "is_highlighted": false, "plan_code": "", "pricing_title": "Gold Membership", "pricing_show_price": true, "pricing_display": "custom", "custom_price": "Pricing", "pricing_heading_txt": "", "pricing_footer_txt": "", "pricing_button_txt": "Sign Up", "pricing_button_position": "footer", "pricing_benefits": [ "" ], "register_price_action": "default", "register_price": "This is a test", "thank_you_page_enabled": false, "thank_you_page_type": "message", "thank_you_message": "", "thank_you_page_id": "0", "custom_login_urls_enabled": false, "custom_login_urls_default": "", "custom_login_urls": [], "expire_type": "none", "expire_after": "1", "expire_unit": "days", "expire_fixed": "2019-03-14", "tax_exempt": false, "allow_renewal": false, "access_url": "", "disable_address_fields": false, "simultaneous_subscriptions": "1", "use_custom_template": false, "custom_template": "template-sitemap.php", "customize_payment_methods": "1", "custom_payment_methods": [ "peum51-1tc" ], "customize_profile_fields": false, "custom_profile_fields": [], "cannot_purchase_message": "You don't have access to purchase this item." }, "member": { "id": 46, "email": "zapier@test.com", "username": "zapier@test.com", "nicename": "zapiertest-com", "url": "", "message": "", "registered_at": "2019-03-19 16:48:20", "first_name": "Zapier", "last_name": "test", "display_name": "zapier@test.com" }, "id": "59", "subscr_id": "cus_EjDYhKuKyRY5N2", "gateway": { "name": "Stripe", "label": "My Stripe gateway", "use_label": true, "icon": "http://yourdomain.com/wp-content/plugins/memberpress/images/checkout/cards.png", "use_icon": true, "desc": "Pay with your credit card via Stripe", "use_desc": true, "id": "peum51-1tc", "has_spc_form": true, "settings": { "gateway": "MeprStripeGateway", "id": "peum51-1tc", "label": "My Stripe gateway", "use_label": true, "use_icon": true, "use_desc": true, "email": "", "sandbox": false, "force_ssl": false, "debug": false, "test_mode": "on", "use_stripe_checkout": false, "churn_buster_enabled": false, "churn_buster_uuid": "", "api_keys": { "test": { "public_key": "pk_test_99NqpKsIsKWcjE2cgvKViV99", "secret_key": "sk_test_99WXy9TgeQGH47NMkNSnSd99" }, "live": { "public": "", "secret": "" } }, "saved": "1", "public_key": "pk_test_99NqpKsIsKWcjE2cgvKViV99", "secret_key": "sk_test_99WXy9TgeQGH47NMkNSnSd99" }, "capabilities": [ "process-credit-cards", "process-payments", "process-refunds", "create-subscriptions", "cancel-subscriptions", "update-subscriptions", "suspend-subscriptions", "resume-subscriptions", "send-cc-expirations" ] }, "price": "100.00", "period": "1", "period_type": "months", "limit_cycles": "0", "limit_cycles_num": "2", "limit_cycles_action": "expire", "prorated_trial": "0", "trial": "0", "trial_days": "0", "trial_amount": "0.00", "status": "cancelled", "created_at": "2019-03-19 16:48:25", "total": "100.00", "tax_rate": "0.000", "tax_amount": "0.00", "tax_desc": "", "tax_class": "standard", "cc_last4": "1111", "cc_exp_month": "10", "cc_exp_year": "2030", "token": "", "tax_compound": "0", "tax_shipping": "1", "response": null }
Create Subscription
Description
Create a Subscription with the given field values.
Search Arguments
None
Update Arguments
subscr_id (string, default value: mp-sub-xxx…) – The Recurring Subscription Number. In order for recurring billings to be tracked, this should be the exact Subsription Number generated by the Payment Gateway for this Subscription.
response (string) – A place where you can store Payment Gateway POST or GET responses for later reference.
gateway (string, default value: manual) – The unique ID of the Payment method that can be found in the payments tab of the MemberPress Settings page.
member (Required) (integer, default value: 0) – The Member's WordPress User ID.
membership (Required) (integer, default value: 0) – The ID of the Membership this Subscription is for.
coupon (integer, default value: 0) – The ID of the Coupon used on this Subscription.
price (decimal, default value: 0.00) – The Subscription Sub-Total Amount.
period (integer, default value: 1) – The Period for the Subscription billing cycles. See Memberships documentation for more info.
period_type (string, default value: lifetime) – The billing period type. See Memberships documentation for more info.
limit_cycles (bool, default value: false) – Whether or not to limit the billing cycles for recurring membership payments. If set to true, MemberPress will cancel the recurring payments after the limit_cycles_num amount has been reached.
limit_cycles_num (integer, default value: 2) – If limit_cycles is true, then this number is used to determine how many recurring billings should happen before MemberPress automatically cancels the Subscription. If set to 1, the Subscription will be cancelled immediately after the first payment has come through, however the member will maintain access until their Transaction has expired.
limit_cycles_action (string, default value: expire) – If limit_cycles is enabled, then this will determine the Member's access after their Subscription has reached its limit_cycles_num limit and has been cancelled. If set to “expire” then the Member will lose access after their last Transaction expires. If set to “lifetime”, the Member will be granted lifetime access.
trial (bool, default value: false) – Whether or not there is a trial period on this Subscription. Trial periods ONLY work on auto-recurring payments.
trial_days (integer, default value: 0) – How many days the trial period should last before the regular billing cycles begin.
trial_amount (decimal, default value: 0.00) – If a trial period is enabled, this specifies how much the user paid for the trial period.
status (Required) (string, default value: pending) – The Subscription's current billing status.
created_at (Required) (string, default value: null) – The date the Subscription was created. This should be in a MySQL datetime format or PHP's date(‘c') format. All dates stored in the database should be in UTC timezone.
total (decimal, default value: 0.00) – The Subscription's Total Amount (including taxes).
cc_last4 (string, default value: null) – The last four digits of the Member's Credit Card associated with this Recurring Subscription.
cc_exp_month (string, default value: null) – The Month (0-12) which the Credit Card expires.
cc_exp_year (string, default value: null) – The 4 digit Year which the Credit Card expires.
Sample Request
$ curl -X POST "http://yourdomain.com/wp-json/mp/v1/subscriptions" \ -H "MEMBERPRESS-API-KEY: API-KEY-HERE" \ -d subscr_id="cus_EuSIHGllVD3168" \ -d price="100.00" \ -d period=1 \ -d period_type=months \ -d limit_cycles_num=2 \ -d limit_cycles_action=expire \ -d trial_amount="0.00" \ -d status=active \ -d created_at="2019-04-18 16:47:19" \ -d total="100.00" \ -d cc_last4=1111 \ -d cc_exp_month=10 \ -d cc_exp_year=2020
Sample Response
{ "coupon": false, "membership": { "id": 15, "title": "Gold Membership", "content": "", "excerpt": "", "date": "2018-08-30 16:10:22", "status": "publish", "author": "2", "date_gmt": "2018-08-30 16:10:22", "modified": "2019-04-01 15:03:22", "modified_gmt": "2019-04-01 21:03:22", "group": "17", "price": "100.00", "period": "1", "period_type": "months", "signup_button_text": "Sign Up", "limit_cycles": false, "limit_cycles_num": "2", "limit_cycles_action": "expire", "trial": false, "trial_days": "0", "trial_amount": "0.00", "trial_once": "1", "group_order": "2", "is_highlighted": false, "plan_code": "", "pricing_title": "Gold Membership", "pricing_show_price": true, "pricing_display": "custom", "custom_price": "Pricing", "pricing_heading_txt": "", "pricing_footer_txt": "", "pricing_button_txt": "Sign Up", "pricing_button_position": "footer", "pricing_benefits": [ "" ], "register_price_action": "default", "register_price": "This is a test", "thank_you_page_enabled": false, "thank_you_page_type": "message", "thank_you_message": "", "thank_you_page_id": "0", "custom_login_urls_enabled": false, "custom_login_urls_default": "", "custom_login_urls": [], "expire_type": "none", "expire_after": "1", "expire_unit": "days", "expire_fixed": "2019-04-01", "tax_exempt": false, "allow_renewal": false, "access_url": "", "disable_address_fields": false, "simultaneous_subscriptions": "1", "use_custom_template": false, "custom_template": "template-sitemap.php", "customize_payment_methods": "1", "custom_payment_methods": [ "peum51-1tc" ], "customize_profile_fields": false, "custom_profile_fields": [], "cannot_purchase_message": "You don't have access to purchase this item." }, "member": { "id": 56, "email": "zapier@test.com", "username": "zapiertest", "nicename": "zapiertest", "url": "", "message": "", "registered_at": "2019-04-18 16:47:14", "first_name": "zapier", "last_name": "test", "display_name": "zapiertest" }, "id": "69", "subscr_id": "cus_EuSIHGllVD3168", "gateway": { "name": "Stripe", "label": "My Stripe gateway", "use_label": true, "icon": "http://your domain.com/wp-content/plugins/memberpress/images/checkout/cards.png", "use_icon": true, "desc": "Pay with your credit card via Stripe", "use_desc": true, "id": "peum51-1tc", "has_spc_form": true, "settings": { "gateway": "MeprStripeGateway", "id": "peum51-1tc", "label": "My Stripe gateway", "use_label": true, "use_icon": true, "use_desc": true, "email": "", "sandbox": false, "force_ssl": false, "debug": false, "test_mode": "on", "use_stripe_checkout": false, "churn_buster_enabled": false, "churn_buster_uuid": "", "api_keys": { "test": { "public_key": "pk_test_99NqpKsIsKWcjE2cgvKViV99", "secret_key": "sk_test_99WXy9TgeQGH47NMkNSnSd99" }, "live": { "public": "", "secret": "" } }, "saved": "1", "public_key": "pk_test_99NqpKsIsKWcjE2cgvKViV99", "secret_key": "sk_test_99WXy9TgeQGH47NMkNSnSd99" }, "capabilities": [ "process-credit-cards", "process-payments", "process-refunds", "create-subscriptions", "cancel-subscriptions", "update-subscriptions", "suspend-subscriptions", "resume-subscriptions", "send-cc-expirations" ] }, "price": "100.00", "period": "1", "period_type": "months", "limit_cycles": "0", "limit_cycles_num": "2", "limit_cycles_action": "expire", "prorated_trial": "0", "trial": "0", "trial_days": "0", "trial_amount": "0.00", "status": "active", "created_at": "2019-04-18 16:47:19", "total": "100.00", "tax_rate": "0.000", "tax_amount": "0.00", "tax_desc": "", "tax_class": "standard", "cc_last4": "1111", "cc_exp_month": "10", "cc_exp_year": "2020", "token": "", "tax_compound": "0", "tax_shipping": "1", "response": null }
Update Subscription
Description
Update a Subscription with the given id and field values.
Search Arguments
None
Update Arguments
subscr_id (string, default value: mp-sub-xxx…) – The Recurring Subscription Number. In order for recurring billings to be tracked, this should be the exact Subsription Number generated by the Payment Gateway for this Subscription.
response (string) – A place where you can store Payment Gateway POST or GET responses for later reference.
gateway (string, default value: manual) – The unique ID of the Payment method that can be found in the payments tab of the MemberPress Settings page.
member (Required) (integer, default value: 0) – The Member's WordPress User ID.
membership (Required) (integer, default value: 0) – The ID of the Membership this Subscription is for.
coupon (integer, default value: 0) – The ID of the Coupon used on this Subscription.
price (decimal, default value: 0.00) – The Subscription Sub-Total Amount.
period (integer, default value: 1) – The Period for the Subscription billing cycles. See Memberships documentation for more info.
period_type (string, default value: lifetime) – The billing period type. See Memberships documentation for more info.
limit_cycles (bool, default value: false) – Whether or not to limit the billing cycles for recurring membership payments. If set to true, MemberPress will cancel the recurring payments after the limit_cycles_num amount has been reached.
limit_cycles_num (integer, default value: 2) – If limit_cycles is true, then this number is used to determine how many recurring billings should happen before MemberPress automatically cancels the Subscription. If set to 1, the Subscription will be cancelled immediately after the first payment has come through, however the member will maintain access until their Transaction has expired.
limit_cycles_action (string, default value: expire) – If limit_cycles is enabled, then this will determine the Member's access after their Subscription has reached its limit_cycles_num limit and has been cancelled. If set to “expire” then the Member will lose access after their last Transaction expires. If set to “lifetime”, the Member will be granted lifetime access.
trial (bool, default value: false) – Whether or not there is a trial period on this Subscription. Trial periods ONLY work on auto-recurring payments.
trial_days (integer, default value: 0) – How many days the trial period should last before the regular billing cycles begin.
trial_amount (decimal, default value: 0.00) – If a trial period is enabled, this specifies how much the user paid for the trial period.
status (Required) (string, default value: pending) – The Subscription's current billing status.
created_at (Required) (string, default value: null) – The date the Subscription was created. This should be in a MySQL datetime format or PHP's date(‘c') format. All dates stored in the database should be in UTC timezone.
total (decimal, default value: 0.00) – The Subscription's Total Amount (including taxes).
cc_last4 (string, default value: null) – The last four digits of the Member's Credit Card associated with this Recurring Subscription.
cc_exp_month (string, default value: null) – The Month (0-12) which the Credit Card expires.
cc_exp_year (string, default value: null) – The 4 digit Year which the Credit Card expires.
Sample Request
$ curl -X POST "http://yourdomain.com/wp-json/mp/v1/subscriptions/69" \ -H "MEMBERPRESS-API-KEY: API-KEY-HERE" \ -d subscr_id="cus_EuSIHGllVD3168" \ -d price="100.00" \ -d period=1 \ -d period_type=months \ -d limit_cycles_num=2 \ -d limit_cycles_action=expire \ -d trial_amount="0.00" \ -d status=active \ -d created_at="2019-04-18 16:47:19" \ -d total="100.00" \ -d cc_last4=1111 \ -d cc_exp_month=10 \ -d cc_exp_year=2020
Sample Response
{ "coupon": false, "membership": { "id": 15, "title": "Gold Membership", "content": "", "excerpt": "", "date": "2018-08-30 16:10:22", "status": "publish", "author": "2", "date_gmt": "2018-08-30 16:10:22", "modified": "2019-04-01 15:03:22", "modified_gmt": "2019-04-01 21:03:22", "group": "17", "price": "100.00", "period": "1", "period_type": "months", "signup_button_text": "Sign Up", "limit_cycles": false, "limit_cycles_num": "2", "limit_cycles_action": "expire", "trial": false, "trial_days": "0", "trial_amount": "0.00", "trial_once": "1", "group_order": "2", "is_highlighted": false, "plan_code": "", "pricing_title": "Gold Membership", "pricing_show_price": true, "pricing_display": "custom", "custom_price": "Pricing", "pricing_heading_txt": "", "pricing_footer_txt": "", "pricing_button_txt": "Sign Up", "pricing_button_position": "footer", "pricing_benefits": [ "" ], "register_price_action": "default", "register_price": "This is a test", "thank_you_page_enabled": false, "thank_you_page_type": "message", "thank_you_message": "", "thank_you_page_id": "0", "custom_login_urls_enabled": false, "custom_login_urls_default": "", "custom_login_urls": [], "expire_type": "none", "expire_after": "1", "expire_unit": "days", "expire_fixed": "2019-04-01", "tax_exempt": false, "allow_renewal": false, "access_url": "", "disable_address_fields": false, "simultaneous_subscriptions": "1", "use_custom_template": false, "custom_template": "template-sitemap.php", "customize_payment_methods": "1", "custom_payment_methods": [ "peum51-1tc" ], "customize_profile_fields": false, "custom_profile_fields": [], "cannot_purchase_message": "You don't have access to purchase this item." }, "member": { "id": 56, "email": "zapier@test.com", "username": "zapiertest", "nicename": "zapiertest", "url": "", "message": "", "registered_at": "2019-04-18 16:47:14", "first_name": "zapier", "last_name": "test", "display_name": "zapiertest" }, "id": "69", "subscr_id": "cus_EuSIHGllVD3168", "gateway": { "name": "Stripe", "label": "My Stripe gateway", "use_label": true, "icon": "http://yourdomain.com/wp-content/plugins/memberpress/images/checkout/cards.png", "use_icon": true, "desc": "Pay with your credit card via Stripe", "use_desc": true, "id": "peum51-1tc", "has_spc_form": true, "settings": { "gateway": "MeprStripeGateway", "id": "peum51-1tc", "label": "My Stripe gateway", "use_label": true, "use_icon": true, "use_desc": true, "email": "", "sandbox": false, "force_ssl": false, "debug": false, "test_mode": "on", "use_stripe_checkout": false, "churn_buster_enabled": false, "churn_buster_uuid": "", "api_keys": { "test": { "public_key": "pk_test_99NqpKsIsKWcjE2cgvKViV99", "secret_key": "sk_test_99WXy9TgeQGH47NMkNSnSd99" }, "live": { "public": "", "secret": "" } }, "saved": "1", "public_key": "pk_test_99NqpKsIsKWcjE2cgvKViV99", "secret_key": "sk_test_99WXy9TgeQGH47NMkNSnSd99" }, "capabilities": [ "process-credit-cards", "process-payments", "process-refunds", "create-subscriptions", "cancel-subscriptions", "update-subscriptions", "suspend-subscriptions", "resume-subscriptions", "send-cc-expirations" ] }, "price": "100.00", "period": "1", "period_type": "months", "limit_cycles": "0", "limit_cycles_num": "2", "limit_cycles_action": "expire", "prorated_trial": "0", "trial": "0", "trial_days": "0", "trial_amount": "0.00", "status": "active", "created_at": "2019-04-18 16:47:19", "total": "100.00", "tax_rate": "0.000", "tax_amount": "0.00", "tax_desc": "", "tax_class": "standard", "cc_last4": "1111", "cc_exp_month": "10", "cc_exp_year": "2020", "token": "", "tax_compound": "0", "tax_shipping": "1", "response": null }
Delete Subscription
Description
Delete a Subscription with the given id.
Search Arguments
None
Update Arguments
None
Sample Request
$ curl -X DELETE "http://yourdomain.com/wp-json/mp/v1/subscriptions/69" \ -H "MEMBERPRESS-API-KEY: API-KEY-HERE" \
Sample Response
{ "coupon": false, "membership": { "id": 15, "title": "Gold Membership", "content": "", "excerpt": "", "date": "2018-08-30 16:10:22", "status": "publish", "author": "2", "date_gmt": "2018-08-30 16:10:22", "modified": "2019-04-01 15:03:22", "modified_gmt": "2019-04-01 21:03:22", "group": "17", "price": "100.00", "period": "1", "period_type": "months", "signup_button_text": "Sign Up", "limit_cycles": false, "limit_cycles_num": "2", "limit_cycles_action": "expire", "trial": false, "trial_days": "0", "trial_amount": "0.00", "trial_once": "1", "group_order": "2", "is_highlighted": false, "plan_code": "", "pricing_title": "Gold Membership", "pricing_show_price": true, "pricing_display": "custom", "custom_price": "Pricing", "pricing_heading_txt": "", "pricing_footer_txt": "", "pricing_button_txt": "Sign Up", "pricing_button_position": "footer", "pricing_benefits": [ "" ], "register_price_action": "default", "register_price": "This is a test", "thank_you_page_enabled": false, "thank_you_page_type": "message", "thank_you_message": "", "thank_you_page_id": "0", "custom_login_urls_enabled": false, "custom_login_urls_default": "", "custom_login_urls": [], "expire_type": "none", "expire_after": "1", "expire_unit": "days", "expire_fixed": "2019-04-01", "tax_exempt": false, "allow_renewal": false, "access_url": "", "disable_address_fields": false, "simultaneous_subscriptions": "1", "use_custom_template": false, "custom_template": "template-sitemap.php", "customize_payment_methods": "1", "custom_payment_methods": [ "peum51-1tc" ], "customize_profile_fields": false, "custom_profile_fields": [], "cannot_purchase_message": "You don't have access to purchase this item." }, "member": { "id": 56, "email": "zapier@test.com", "username": "zapiertest", "nicename": "zapiertest", "url": "", "message": "", "registered_at": "2019-04-18 16:47:14", "first_name": "zapier", "last_name": "test", "display_name": "zapiertest" }, "id": "69", "subscr_id": "cus_EuSIHGllVD3168", "gateway": { "name": "Stripe", "label": "My Stripe gateway", "use_label": true, "icon": "http://yourdomain.com/wp-content/plugins/memberpress/images/checkout/cards.png", "use_icon": true, "desc": "Pay with your credit card via Stripe", "use_desc": true, "id": "peum51-1tc", "has_spc_form": true, "settings": { "gateway": "MeprStripeGateway", "id": "peum51-1tc", "label": "My Stripe gateway", "use_label": true, "use_icon": true, "use_desc": true, "email": "", "sandbox": false, "force_ssl": false, "debug": false, "test_mode": "on", "use_stripe_checkout": false, "churn_buster_enabled": false, "churn_buster_uuid": "", "api_keys": { "test": { "public_key": "pk_test_99NqpKsIsKWcjE2cgvKViV99", "secret_key": "sk_test_99WXy9TgeQGH47NMkNSnSd99" }, "live": { "public": "", "secret": "" } }, "saved": "1", "public_key": "pk_test_99NqpKsIsKWcjE2cgvKViV99", "secret_key": "sk_test_99WXy9TgeQGH47NMkNSnSd99" }, "capabilities": [ "process-credit-cards", "process-payments", "process-refunds", "create-subscriptions", "cancel-subscriptions", "update-subscriptions", "suspend-subscriptions", "resume-subscriptions", "send-cc-expirations" ] }, "price": "100.00", "period": "1", "period_type": "months", "limit_cycles": "0", "limit_cycles_num": "2", "limit_cycles_action": "expire", "prorated_trial": "0", "trial": "0", "trial_days": "0", "trial_amount": "0.00", "status": "active", "created_at": "2019-04-18 16:47:19", "total": "100.00", "tax_rate": "0.000", "tax_amount": "0.00", "tax_desc": "", "tax_class": "standard", "cc_last4": "1111", "cc_exp_month": "10", "cc_exp_year": "2020", "token": "", "tax_compound": "0", "tax_shipping": "1", "response": null }
Cancel Subscription
Description
Cancel a given subscription.
Search Arguments
None
Update Arguments
None
Sample Request
$ curl -X POST "http://yourdomain.com/wp-json/mp/v1/subscriptions/59/cancel" \ -H "MEMBERPRESS-API-KEY: API-KEY-HERE" \
Sample Response
{ "message": "The subscription was successfully cancelled.", "data": { "coupon": false, "membership": { "id": 15, "title": "Gold Membership", "content": "", "excerpt": "", "date": "2018-08-30 16:10:22", "status": "publish", "author": "2", "date_gmt": "2018-08-30 16:10:22", "modified": "2019-03-14 13:10:21", "modified_gmt": "2019-03-14 19:10:21", "group": "17", "price": "100.00", "period": "1", "period_type": "months", "signup_button_text": "Sign Up", "limit_cycles": false, "limit_cycles_num": "2", "limit_cycles_action": "expire", "trial": false, "trial_days": "0", "trial_amount": "0.00", "trial_once": "1", "group_order": "2", "is_highlighted": false, "plan_code": "", "pricing_title": "Gold Membership", "pricing_show_price": true, "pricing_display": "custom", "custom_price": "Pricing", "pricing_heading_txt": "", "pricing_footer_txt": "", "pricing_button_txt": "Sign Up", "pricing_button_position": "footer", "pricing_benefits": [ "" ], "register_price_action": "default", "register_price": "This is a test", "thank_you_page_enabled": false, "thank_you_page_type": "message", "thank_you_message": "", "thank_you_page_id": "0", "custom_login_urls_enabled": false, "custom_login_urls_default": "", "custom_login_urls": [], "expire_type": "none", "expire_after": "1", "expire_unit": "days", "expire_fixed": "2019-03-14", "tax_exempt": false, "allow_renewal": false, "access_url": "", "disable_address_fields": false, "simultaneous_subscriptions": "1", "use_custom_template": false, "custom_template": "template-sitemap.php", "customize_payment_methods": "1", "custom_payment_methods": [ "peum51-1tc" ], "customize_profile_fields": false, "custom_profile_fields": [], "cannot_purchase_message": "You don't have access to purchase this item." }, "member": { "id": 46, "email": "zapier@test.com", "username": "zapier@test.com", "nicename": "zapiertest-com", "url": "", "message": "", "registered_at": "2019-03-19 16:48:20", "first_name": "Zapier", "last_name": "test", "display_name": "zapier@test.com" }, "id": "59", "subscr_id": "cus_EjDYhKuKyRY5N2", "gateway": { "name": "Stripe", "label": "My Stripe gateway", "use_label": true, "icon": "http://yourdomain.com/wp-content/plugins/memberpress/images/checkout/cards.png", "use_icon": true, "desc": "Pay with your credit card via Stripe", "use_desc": true, "id": "peum51-1tc", "has_spc_form": true, "settings": { "gateway": "MeprStripeGateway", "id": "peum51-1tc", "label": "My Stripe gateway", "use_label": true, "use_icon": true, "use_desc": true, "email": "", "sandbox": false, "force_ssl": false, "debug": false, "test_mode": "on", "use_stripe_checkout": false, "churn_buster_enabled": false, "churn_buster_uuid": "", "api_keys": { "test": { "public_key": "pk_test_99NqpKsIsKWcjE2cgvKViV99", "secret_key": "sk_test_99WXy9TgeQGH47NMkNSnSd99" }, "live": { "public": "", "secret": "" } }, "saved": "1", "public_key": "pk_test_99NqpKsIsKWcjE2cgvKViV99", "secret_key": "sk_test_99WXy9TgeQGH47NMkNSnSd99" }, "capabilities": [ "process-credit-cards", "process-payments", "process-refunds", "create-subscriptions", "cancel-subscriptions", "update-subscriptions", "suspend-subscriptions", "resume-subscriptions", "send-cc-expirations" ] }, "price": "100.00", "period": "1", "period_type": "months", "limit_cycles": "0", "limit_cycles_num": "2", "limit_cycles_action": "expire", "prorated_trial": "0", "trial": "0", "trial_days": "0", "trial_amount": "0.00", "status": "cancelled", "created_at": "2019-03-19 16:48:25", "total": "100.00", "tax_rate": "0.000", "tax_amount": "0.00", "tax_desc": "", "tax_class": "standard", "cc_last4": "1111", "cc_exp_month": "10", "cc_exp_year": "2030", "token": "", "tax_compound": "0", "tax_shipping": "1", "response": null } }
Expire Subscription
Description
Expire all unexpired transactions associated with the Subscription.
Search Arguments
None
Update Arguments
None
Sample Request
$ curl -X POST "http://yourdomain/wp-json/mp/v1/subscriptions/69/expire" \ -H "MEMBERPRESS-API-KEY: API-KEY-HERE" \
Sample Response
{ "message": "This subscription is now expired.", "data": { "coupon": false, "membership": { "id": 15, "title": "Gold Membership", "content": "", "excerpt": "", "date": "2018-08-30 16:10:22", "status": "publish", "author": "2", "date_gmt": "2018-08-30 16:10:22", "modified": "2019-04-01 15:03:22", "modified_gmt": "2019-04-01 21:03:22", "group": "17", "price": "100.00", "period": "1", "period_type": "months", "signup_button_text": "Sign Up", "limit_cycles": false, "limit_cycles_num": "2", "limit_cycles_action": "expire", "trial": false, "trial_days": "0", "trial_amount": "0.00", "trial_once": "1", "group_order": "2", "is_highlighted": false, "plan_code": "", "pricing_title": "Gold Membership", "pricing_show_price": true, "pricing_display": "custom", "custom_price": "Pricing", "pricing_heading_txt": "", "pricing_footer_txt": "", "pricing_button_txt": "Sign Up", "pricing_button_position": "footer", "pricing_benefits": [ "" ], "register_price_action": "default", "register_price": "This is a test", "thank_you_page_enabled": false, "thank_you_page_type": "message", "thank_you_message": "", "thank_you_page_id": "0", "custom_login_urls_enabled": false, "custom_login_urls_default": "", "custom_login_urls": [], "expire_type": "none", "expire_after": "1", "expire_unit": "days", "expire_fixed": "2019-04-01", "tax_exempt": false, "allow_renewal": false, "access_url": "", "disable_address_fields": false, "simultaneous_subscriptions": "1", "use_custom_template": false, "custom_template": "template-sitemap.php", "customize_payment_methods": "1", "custom_payment_methods": [ "peum51-1tc" ], "customize_profile_fields": false, "custom_profile_fields": [], "cannot_purchase_message": "You don't have access to purchase this item." }, "member": { "id": 56, "email": "zapier@test.com", "username": "zapiertest", "nicename": "zapiertest", "url": "", "message": "", "registered_at": "2019-04-18 16:47:14", "first_name": "zapier", "last_name": "test", "display_name": "zapiertest" }, "id": "69", "subscr_id": "cus_EuSIHGllVD3168", "gateway": { "name": "Stripe", "label": "My Stripe gateway", "use_label": true, "icon": "http://yourdomain.com/wp-content/plugins/memberpress/images/checkout/cards.png", "use_icon": true, "desc": "Pay with your credit card via Stripe", "use_desc": true, "id": "peum51-1tc", "has_spc_form": true, "settings": { "gateway": "MeprStripeGateway", "id": "peum51-1tc", "label": "My Stripe gateway", "use_label": true, "use_icon": true, "use_desc": true, "email": "", "sandbox": false, "force_ssl": false, "debug": false, "test_mode": "on", "use_stripe_checkout": false, "churn_buster_enabled": false, "churn_buster_uuid": "", "api_keys": { "test": { "public_key": "pk_test_99NqpKsIsKWcjE2cgvKViV99", "secret_key": "sk_test_99WXy9TgeQGH47NMkNSnSd99" }, "live": { "public": "", "secret": "" } }, "saved": "1", "public_key": "pk_test_99NqpKsIsKWcjE2cgvKViV99", "secret_key": "sk_test_99WXy9TgeQGH47NMkNSnSd99" }, "capabilities": [ "process-credit-cards", "process-payments", "process-refunds", "create-subscriptions", "cancel-subscriptions", "update-subscriptions", "suspend-subscriptions", "resume-subscriptions", "send-cc-expirations" ] }, "price": "100.00", "period": "1", "period_type": "months", "limit_cycles": "0", "limit_cycles_num": "2", "limit_cycles_action": "expire", "prorated_trial": "0", "trial": "0", "trial_days": "0", "trial_amount": "0.00", "status": "active", "created_at": "2019-04-18 16:47:19", "total": "100.00", "tax_rate": "0.000", "tax_amount": "0.00", "tax_desc": "", "tax_class": "standard", "cc_last4": "1111", "cc_exp_month": "10", "cc_exp_year": "2020", "token": "", "tax_compound": "0", "tax_shipping": "1", "response": null } }
Get Members
Description
Get all Members based on the search arguments provided.
Search Arguments
page (integer, default value: 1) – Current page of the collection.
per_page (integer, default value: 10) – Maximum number of items to be returned in result set.
search (string) – Limit results to those matching a string. Can only search by email or username.
Update Arguments
None
Sample Request
$ curl "http://yourdomain.com/wp-json/mp/v1/members?page=2&per_page=10" \ -H "MEMBERPRESS-API-KEY: API-KEY-HERE" \
Sample Response
[ { "id": 56, "email": "zapier@test.com", "username": "zapiertest", "nicename": "zapiertest", "url": "", "message": "", "registered_at": "2019-04-18 16:47:14", "first_name": "zapier", "last_name": "test", "display_name": "zapiertest", "active_memberships": [ { "id": 15, "title": "Gold Membership", "content": "", "excerpt": "", "date": "2018-08-30 16:10:22", "status": "publish", "author": "2", "date_gmt": "2018-08-30 16:10:22", "modified": "2019-04-01 15:03:22", "modified_gmt": "2019-04-01 21:03:22", "group": "17", "price": "100.00", "period": "1", "period_type": "months", "signup_button_text": "Sign Up", "limit_cycles": false, "limit_cycles_num": "2", "limit_cycles_action": "expire", "trial": false, "trial_days": "0", "trial_amount": "0.00", "trial_once": "1", "group_order": "2", "is_highlighted": false, "plan_code": "", "pricing_title": "Gold Membership", "pricing_show_price": true, "pricing_display": "custom", "custom_price": "Pricing", "pricing_heading_txt": "", "pricing_footer_txt": "", "pricing_button_txt": "Sign Up", "pricing_button_position": "footer", "pricing_benefits": [ "" ], "register_price_action": "default", "register_price": "This is a test", "thank_you_page_enabled": false, "thank_you_page_type": "message", "thank_you_message": "", "thank_you_page_id": "0", "custom_login_urls_enabled": false, "custom_login_urls_default": "", "custom_login_urls": [], "expire_type": "none", "expire_after": "1", "expire_unit": "days", "expire_fixed": "2019-04-01", "tax_exempt": false, "allow_renewal": false, "access_url": "", "disable_address_fields": false, "simultaneous_subscriptions": "1", "use_custom_template": false, "custom_template": "template-sitemap.php", "customize_payment_methods": "1", "custom_payment_methods": [ "peum51-1tc" ], "customize_profile_fields": false, "custom_profile_fields": [], "cannot_purchase_message": "You don't have access to purchase this item." }, { "id": 15, "title": "Gold Membership", "content": "", "excerpt": "", "date": "2018-08-30 16:10:22", "status": "publish", "author": "2", "date_gmt": "2018-08-30 16:10:22", "modified": "2019-04-01 15:03:22", "modified_gmt": "2019-04-01 21:03:22", "group": "17", "price": "100.00", "period": "1", "period_type": "months", "signup_button_text": "Sign Up", "limit_cycles": false, "limit_cycles_num": "2", "limit_cycles_action": "expire", "trial": false, "trial_days": "0", "trial_amount": "0.00", "trial_once": "1", "group_order": "2", "is_highlighted": false, "plan_code": "", "pricing_title": "Gold Membership", "pricing_show_price": true, "pricing_display": "custom", "custom_price": "Pricing", "pricing_heading_txt": "", "pricing_footer_txt": "", "pricing_button_txt": "Sign Up", "pricing_button_position": "footer", "pricing_benefits": [ "" ], "register_price_action": "default", "register_price": "This is a test", "thank_you_page_enabled": false, "thank_you_page_type": "message", "thank_you_message": "", "thank_you_page_id": "0", "custom_login_urls_enabled": false, "custom_login_urls_default": "", "custom_login_urls": [], "expire_type": "none", "expire_after": "1", "expire_unit": "days", "expire_fixed": "2019-04-01", "tax_exempt": false, "allow_renewal": false, "access_url": "", "disable_address_fields": false, "simultaneous_subscriptions": "1", "use_custom_template": false, "custom_template": "template-sitemap.php", "customize_payment_methods": "1", "custom_payment_methods": [ "peum51-1tc" ], "customize_profile_fields": false, "custom_profile_fields": [], "cannot_purchase_message": "You don't have access to purchase this item." } ], "active_txn_count": "2", "expired_txn_count": "0", "trial_txn_count": null, "sub_count": null, "login_count": "1", "first_txn": { "membership": "15", "member": "56", "coupon": "0", "subscription": "69", "id": "198", "amount": "0.00", "total": "0.00", "tax_amount": "0.00", "tax_rate": "0.000", "tax_desc": "", "tax_class": "standard", "trans_num": "cus_EuSIHGllVD3168", "status": "confirmed", "txn_type": "subscription_confirmation", "gateway": "peum51-1tc", "prorated": "0", "created_at": "2019-04-18 16:47:14", "expires_at": "2019-04-18 23:59:59", "corporate_account_id": "0", "parent_transaction_id": "0", "tax_compound": "0", "tax_shipping": "1", "response": null }, "latest_txn": { "membership": "15", "member": "56", "coupon": "0", "subscription": "69", "id": "199", "amount": "100.00", "total": "100.00", "tax_amount": "0.00", "tax_rate": "0.000", "tax_desc": "", "tax_class": "standard", "trans_num": "ch_1EQdOLJT1LHvX6ILZhIzeboJ", "status": "complete", "txn_type": "payment", "gateway": "peum51-1tc", "prorated": "0", "created_at": "2019-04-18 16:47:21", "expires_at": "2019-05-18 23:59:59", "corporate_account_id": "0", "parent_transaction_id": "0", "tax_compound": "0", "tax_shipping": "1", "response": null }, "address": { "mepr-address-one": "123 fake st", "mepr-address-two": "", "mepr-address-city": "city", "mepr-address-state": "UT", "mepr-address-zip": "81111", "mepr-address-country": "US" }, "profile": { "mepr_company_name": "MemberPress", "mepr_birthday": "2019-04-18", "mepr_testslug": "" }, "recent_transactions": [ { "membership": "15", "member": "56", "coupon": "0", "subscription": "69", "id": "199", "amount": "100.00", "total": "100.00", "tax_amount": "0.00", "tax_rate": "0.000", "tax_desc": "", "tax_class": "standard", "trans_num": "ch_1EQdOLJT1LHvX6ILZhIzeboJ", "status": "complete", "txn_type": "payment", "gateway": "peum51-1tc", "prorated": "0", "created_at": "2019-04-18 16:47:21", "expires_at": "2019-05-18 23:59:59", "corporate_account_id": "0", "parent_transaction_id": "0", "tax_compound": "0", "tax_shipping": "1", "response": null }, { "membership": "15", "member": "56", "coupon": "0", "subscription": "69", "id": "198", "amount": "0.00", "total": "0.00", "tax_amount": "0.00", "tax_rate": "0.000", "tax_desc": "", "tax_class": "standard", "trans_num": "cus_EuSIHGllVD3168", "status": "confirmed", "txn_type": "subscription_confirmation", "gateway": "peum51-1tc", "prorated": "0", "created_at": "2019-04-18 16:47:14", "expires_at": "2019-04-18 23:59:59", "corporate_account_id": "0", "parent_transaction_id": "0", "tax_compound": "0", "tax_shipping": "1", "response": null } ], "recent_subscriptions": [ { "coupon": "0", "membership": "15", "member": "56", "id": "69", "subscr_id": "cus_EuSIHGllVD3168", "gateway": "peum51-1tc", "price": "100.00", "period": "1", "period_type": "months", "limit_cycles": "0", "limit_cycles_num": "2", "limit_cycles_action": "expire", "prorated_trial": "0", "trial": "0", "trial_days": "0", "trial_amount": "0.00", "status": "active", "created_at": "2019-04-18 16:47:19", "total": "100.00", "tax_rate": "0.000", "tax_amount": "0.00", "tax_desc": "", "tax_class": "standard", "cc_last4": "1111", "cc_exp_month": "10", "cc_exp_year": "2020", "token": "", "tax_compound": "0", "tax_shipping": "1", "response": null } ] }, { "id": 55, "email": "one@day.com", "username": "one@day.com", "nicename": "oneday-com", "url": "", "message": "", "registered_at": "2019-04-04 18:15:38", "first_name": "", "last_name": "", "display_name": "one@day.com", "active_memberships": [], "active_txn_count": "0", "expired_txn_count": "1", "trial_txn_count": null, "sub_count": null, "login_count": "1", "first_txn": { "membership": "271", "member": "55", "coupon": "0", "subscription": "0", "id": "185", "amount": "10.00", "total": "10.00", "tax_amount": "0.00", "tax_rate": "0.000", "tax_desc": "", "tax_class": "standard", "trans_num": "ch_1ELa6BJT1LHvX6ILT6jbOGYE", "status": "complete", "txn_type": "payment", "gateway": "peum51-1tc", "prorated": "0", "created_at": "2019-04-04 18:15:38", "expires_at": "2019-04-05 23:59:59", "corporate_account_id": "0", "parent_transaction_id": "0", "tax_compound": "0", "tax_shipping": "1", "response": null }, "latest_txn": { "membership": "271", "member": "55", "coupon": "0", "subscription": "0", "id": "185", "amount": "10.00", "total": "10.00", "tax_amount": "0.00", "tax_rate": "0.000", "tax_desc": "", "tax_class": "standard", "trans_num": "ch_1ELa6BJT1LHvX6ILT6jbOGYE", "status": "complete", "txn_type": "payment", "gateway": "peum51-1tc", "prorated": "0", "created_at": "2019-04-04 18:15:38", "expires_at": "2019-04-05 23:59:59", "corporate_account_id": "0", "parent_transaction_id": "0", "tax_compound": "0", "tax_shipping": "1", "response": null }, "address": { "mepr-address-one": "", "mepr-address-two": "", "mepr-address-city": "", "mepr-address-state": "", "mepr-address-zip": "", "mepr-address-country": "" }, "profile": { "mepr_company_name": "", "mepr_birthday": "", "mepr_testslug": "" }, "recent_transactions": [ { "membership": "271", "member": "55", "coupon": "0", "subscription": "0", "id": "185", "amount": "10.00", "total": "10.00", "tax_amount": "0.00", "tax_rate": "0.000", "tax_desc": "", "tax_class": "standard", "trans_num": "ch_1ELa6BJT1LHvX6ILT6jbOGYE", "status": "complete", "txn_type": "payment", "gateway": "peum51-1tc", "prorated": "0", "created_at": "2019-04-04 18:15:38", "expires_at": "2019-04-05 23:59:59", "corporate_account_id": "0", "parent_transaction_id": "0", "tax_compound": "0", "tax_shipping": "1", "response": null } ], "recent_subscriptions": [] }, { "id": 54, "email": "buddy@test2.com", "username": "buddy@test2.com", "nicename": "buddytest2-com", "url": "", "message": "", "registered_at": "2019-04-03 19:42:37", "first_name": "", "last_name": "", "display_name": "buddy@test2.com", "active_memberships": [ { "id": 15, "title": "Gold Membership", "content": "", "excerpt": "", "date": "2018-08-30 16:10:22", "status": "publish", "author": "2", "date_gmt": "2018-08-30 16:10:22", "modified": "2019-04-01 15:03:22", "modified_gmt": "2019-04-01 21:03:22", "group": "17", "price": "100.00", "period": "1", "period_type": "months", "signup_button_text": "Sign Up", "limit_cycles": false, "limit_cycles_num": "2", "limit_cycles_action": "expire", "trial": false, "trial_days": "0", "trial_amount": "0.00", "trial_once": "1", "group_order": "2", "is_highlighted": false, "plan_code": "", "pricing_title": "Gold Membership", "pricing_show_price": true, "pricing_display": "custom", "custom_price": "Pricing", "pricing_heading_txt": "", "pricing_footer_txt": "", "pricing_button_txt": "Sign Up", "pricing_button_position": "footer", "pricing_benefits": [ "" ], "register_price_action": "default", "register_price": "This is a test", "thank_you_page_enabled": false, "thank_you_page_type": "message", "thank_you_message": "", "thank_you_page_id": "0", "custom_login_urls_enabled": false, "custom_login_urls_default": "", "custom_login_urls": [], "expire_type": "none", "expire_after": "1", "expire_unit": "days", "expire_fixed": "2019-04-01", "tax_exempt": false, "allow_renewal": false, "access_url": "", "disable_address_fields": false, "simultaneous_subscriptions": "1", "use_custom_template": false, "custom_template": "template-sitemap.php", "customize_payment_methods": "1", "custom_payment_methods": [ "peum51-1tc" ], "customize_profile_fields": false, "custom_profile_fields": [], "cannot_purchase_message": "You don't have access to purchase this item." } ], "active_txn_count": "1", "expired_txn_count": "1", "trial_txn_count": null, "sub_count": null, "login_count": "1", "first_txn": { "membership": "15", "member": "54", "coupon": "0", "subscription": "67", "id": "183", "amount": "0.00", "total": "0.00", "tax_amount": "0.00", "tax_rate": "0.000", "tax_desc": "", "tax_class": "standard", "trans_num": "cus_EoskD8WRM2bxrG", "status": "confirmed", "txn_type": "subscription_confirmation", "gateway": "peum51-1tc", "prorated": "0", "created_at": "2019-04-03 19:42:37", "expires_at": "2019-04-03 23:59:59", "corporate_account_id": "0", "parent_transaction_id": "0", "tax_compound": "0", "tax_shipping": "1", "response": null }, "latest_txn": { "membership": "15", "member": "54", "coupon": "0", "subscription": "67", "id": "184", "amount": "100.00", "total": "100.00", "tax_amount": "0.00", "tax_rate": "0.000", "tax_desc": "", "tax_class": "standard", "trans_num": "ch_1ELEysJT1LHvX6IL3pDJI5tU", "status": "complete", "txn_type": "payment", "gateway": "peum51-1tc", "prorated": "0", "created_at": "2019-04-03 19:42:45", "expires_at": "2019-05-03 23:59:59", "corporate_account_id": "0", "parent_transaction_id": "0", "tax_compound": "0", "tax_shipping": "1", "response": null }, "address": { "mepr-address-one": "", "mepr-address-two": "", "mepr-address-city": "", "mepr-address-state": "", "mepr-address-zip": "", "mepr-address-country": "" }, "profile": { "mepr_company_name": "", "mepr_birthday": "", "mepr_testslug": "" }, "recent_transactions": [ { "membership": "15", "member": "54", "coupon": "0", "subscription": "67", "id": "184", "amount": "100.00", "total": "100.00", "tax_amount": "0.00", "tax_rate": "0.000", "tax_desc": "", "tax_class": "standard", "trans_num": "ch_1ELEysJT1LHvX6IL3pDJI5tU", "status": "complete", "txn_type": "payment", "gateway": "peum51-1tc", "prorated": "0", "created_at": "2019-04-03 19:42:45", "expires_at": "2019-05-03 23:59:59", "corporate_account_id": "0", "parent_transaction_id": "0", "tax_compound": "0", "tax_shipping": "1", "response": null }, { "membership": "15", "member": "54", "coupon": "0", "subscription": "67", "id": "183", "amount": "0.00", "total": "0.00", "tax_amount": "0.00", "tax_rate": "0.000", "tax_desc": "", "tax_class": "standard", "trans_num": "cus_EoskD8WRM2bxrG", "status": "confirmed", "txn_type": "subscription_confirmation", "gateway": "peum51-1tc", "prorated": "0", "created_at": "2019-04-03 19:42:37", "expires_at": "2019-04-03 23:59:59", "corporate_account_id": "0", "parent_transaction_id": "0", "tax_compound": "0", "tax_shipping": "1", "response": null } ], "recent_subscriptions": [ { "coupon": "0", "membership": "15", "member": "54", "id": "67", "subscr_id": "cus_EoskD8WRM2bxrG", "gateway": "peum51-1tc", "price": "100.00", "period": "1", "period_type": "months", "limit_cycles": "0", "limit_cycles_num": "2", "limit_cycles_action": "expire", "prorated_trial": "0", "trial": "0", "trial_days": "0", "trial_amount": "0.00", "status": "active", "created_at": "2019-04-03 19:42:44", "total": "100.00", "tax_rate": "0.000", "tax_amount": "0.00", "tax_desc": "", "tax_class": "standard", "cc_last4": "1111", "cc_exp_month": "10", "cc_exp_year": "2020", "token": "", "tax_compound": "0", "tax_shipping": "1", "response": null } ] }, { "id": 53, "email": "coupon@testing7.com", "username": "coupon@testing7.com", "nicename": "coupontesting7-com", "url": "", "message": "", "registered_at": "2019-04-03 18:16:02", "first_name": "coupon", "last_name": "testing7", "display_name": "coupon testing7", "active_memberships": [ { "id": 267, "title": "coupon testing", "content": "", "excerpt": "", "date": "2019-04-03 11:18:41", "status": "publish", "author": "5", "date_gmt": "2019-04-03 17:18:41", "modified": "2019-04-04 10:58:44", "modified_gmt": "2019-04-04 16:58:44", "group": "0", "price": "9.99", "period": "1", "period_type": "months", "signup_button_text": "Sign Up", "limit_cycles": false, "limit_cycles_num": "2", "limit_cycles_action": "expire", "trial": "1", "trial_days": "90", "trial_amount": "29.94", "trial_once": "1", "group_order": "0", "is_highlighted": false, "plan_code": "", "pricing_title": "coupon testing", "pricing_show_price": true, "pricing_display": "auto", "custom_price": "", "pricing_heading_txt": "", "pricing_footer_txt": "", "pricing_button_txt": "Sign Up", "pricing_button_position": "footer", "pricing_benefits": [ "" ], "register_price_action": "default", "register_price": "", "thank_you_page_enabled": false, "thank_you_page_type": "message", "thank_you_message": "", "thank_you_page_id": "0", "custom_login_urls_enabled": false, "custom_login_urls_default": "", "custom_login_urls": [], "expire_type": "none", "expire_after": "1", "expire_unit": "days", "expire_fixed": "2019-04-04", "tax_exempt": false, "allow_renewal": false, "access_url": "", "disable_address_fields": false, "simultaneous_subscriptions": false, "use_custom_template": false, "custom_template": "template-sitemap.php", "customize_payment_methods": false, "custom_payment_methods": [], "customize_profile_fields": false, "custom_profile_fields": [], "cannot_purchase_message": "You don't have access to purchase this item." } ], "active_txn_count": "1", "expired_txn_count": "0", "trial_txn_count": null, "sub_count": null, "login_count": "1", "first_txn": { "membership": "267", "member": "53", "coupon": "269", "subscription": "0", "id": "182", "amount": "0.00", "total": "0.00", "tax_amount": "0.00", "tax_rate": "0.000", "tax_desc": "", "tax_class": "standard", "trans_num": "mp-txn-5ca4f8639d842", "status": "complete", "txn_type": "payment", "gateway": "free", "prorated": "0", "created_at": "2019-04-03 18:16:02", "expires_at": "0000-00-00 00:00:00", "corporate_account_id": "0", "parent_transaction_id": "0", "tax_compound": "0", "tax_shipping": "1", "response": null }, "latest_txn": { "membership": "267", "member": "53", "coupon": "269", "subscription": "0", "id": "182", "amount": "0.00", "total": "0.00", "tax_amount": "0.00", "tax_rate": "0.000", "tax_desc": "", "tax_class": "standard", "trans_num": "mp-txn-5ca4f8639d842", "status": "complete", "txn_type": "payment", "gateway": "free", "prorated": "0", "created_at": "2019-04-03 18:16:02", "expires_at": "0000-00-00 00:00:00", "corporate_account_id": "0", "parent_transaction_id": "0", "tax_compound": "0", "tax_shipping": "1", "response": null }, "address": { "mepr-address-one": "123 fake st", "mepr-address-two": "", "mepr-address-city": "city", "mepr-address-state": "UT", "mepr-address-zip": "81111", "mepr-address-country": "US" }, "profile": { "mepr_company_name": "blah", "mepr_birthday": "2019-04-03", "mepr_testslug": "" }, "recent_transactions": [ { "membership": "267", "member": "53", "coupon": "269", "subscription": "0", "id": "182", "amount": "0.00", "total": "0.00", "tax_amount": "0.00", "tax_rate": "0.000", "tax_desc": "", "tax_class": "standard", "trans_num": "mp-txn-5ca4f8639d842", "status": "complete", "txn_type": "payment", "gateway": "free", "prorated": "0", "created_at": "2019-04-03 18:16:02", "expires_at": "0000-00-00 00:00:00", "corporate_account_id": "0", "parent_transaction_id": "0", "tax_compound": "0", "tax_shipping": "1", "response": null } ], "recent_subscriptions": [] }, { "id": 52, "email": "coupon@testing6.com", "username": "coupon@testing6.com", "nicename": "coupontesting6-com", "url": "", "message": "", "registered_at": "2019-04-03 18:04:07", "first_name": "coupon", "last_name": "testing5", "display_name": "coupon testing5", "active_memberships": [ { "id": 267, "title": "coupon testing", "content": "", "excerpt": "", "date": "2019-04-03 11:18:41", "status": "publish", "author": "5", "date_gmt": "2019-04-03 17:18:41", "modified": "2019-04-04 10:58:44", "modified_gmt": "2019-04-04 16:58:44", "group": "0", "price": "9.99", "period": "1", "period_type": "months", "signup_button_text": "Sign Up", "limit_cycles": false, "limit_cycles_num": "2", "limit_cycles_action": "expire", "trial": "1", "trial_days": "90", "trial_amount": "29.94", "trial_once": "1", "group_order": "0", "is_highlighted": false, "plan_code": "", "pricing_title": "coupon testing", "pricing_show_price": true, "pricing_display": "auto", "custom_price": "", "pricing_heading_txt": "", "pricing_footer_txt": "", "pricing_button_txt": "Sign Up", "pricing_button_position": "footer", "pricing_benefits": [ "" ], "register_price_action": "default", "register_price": "", "thank_you_page_enabled": false, "thank_you_page_type": "message", "thank_you_message": "", "thank_you_page_id": "0", "custom_login_urls_enabled": false, "custom_login_urls_default": "", "custom_login_urls": [], "expire_type": "none", "expire_after": "1", "expire_unit": "days", "expire_fixed": "2019-04-04", "tax_exempt": false, "allow_renewal": false, "access_url": "", "disable_address_fields": false, "simultaneous_subscriptions": false, "use_custom_template": false, "custom_template": "template-sitemap.php", "customize_payment_methods": false, "custom_payment_methods": [], "customize_profile_fields": false, "custom_profile_fields": [], "cannot_purchase_message": "You don't have access to purchase this item." } ], "active_txn_count": "1", "expired_txn_count": "0", "trial_txn_count": null, "sub_count": null, "login_count": "1", "first_txn": { "membership": "267", "member": "52", "coupon": "269", "subscription": "0", "id": "181", "amount": "0.00", "total": "0.00", "tax_amount": "0.00", "tax_rate": "0.000", "tax_desc": "", "tax_class": "standard", "trans_num": "mp-txn-5ca4f59b09b62", "status": "complete", "txn_type": "payment", "gateway": "free", "prorated": "0", "created_at": "2019-04-03 18:04:07", "expires_at": "0000-00-00 00:00:00", "corporate_account_id": "0", "parent_transaction_id": "0", "tax_compound": "0", "tax_shipping": "1", "response": null }, "latest_txn": { "membership": "267", "member": "52", "coupon": "269", "subscription": "0", "id": "181", "amount": "0.00", "total": "0.00", "tax_amount": "0.00", "tax_rate": "0.000", "tax_desc": "", "tax_class": "standard", "trans_num": "mp-txn-5ca4f59b09b62", "status": "complete", "txn_type": "payment", "gateway": "free", "prorated": "0", "created_at": "2019-04-03 18:04:07", "expires_at": "0000-00-00 00:00:00", "corporate_account_id": "0", "parent_transaction_id": "0", "tax_compound": "0", "tax_shipping": "1", "response": null }, "address": { "mepr-address-one": "123 fake st", "mepr-address-two": "", "mepr-address-city": "city", "mepr-address-state": "UT", "mepr-address-zip": "81111", "mepr-address-country": "US" }, "profile": { "mepr_company_name": "blah", "mepr_birthday": "2019-04-03", "mepr_testslug": "" }, "recent_transactions": [ { "membership": "267", "member": "52", "coupon": "269", "subscription": "0", "id": "181", "amount": "0.00", "total": "0.00", "tax_amount": "0.00", "tax_rate": "0.000", "tax_desc": "", "tax_class": "standard", "trans_num": "mp-txn-5ca4f59b09b62", "status": "complete", "txn_type": "payment", "gateway": "free", "prorated": "0", "created_at": "2019-04-03 18:04:07", "expires_at": "0000-00-00 00:00:00", "corporate_account_id": "0", "parent_transaction_id": "0", "tax_compound": "0", "tax_shipping": "1", "response": null } ], "recent_subscriptions": [] }, { "id": 51, "email": "coupon@testing4.com", "username": "coupon@testing4.com", "nicename": "coupontesting4-com", "url": "", "message": "", "registered_at": "2019-04-03 18:01:05", "first_name": "coupon", "last_name": "testing4", "display_name": "coupon testing4", "active_memberships": [ { "id": 267, "title": "coupon testing", "content": "", "excerpt": "", "date": "2019-04-03 11:18:41", "status": "publish", "author": "5", "date_gmt": "2019-04-03 17:18:41", "modified": "2019-04-04 10:58:44", "modified_gmt": "2019-04-04 16:58:44", "group": "0", "price": "9.99", "period": "1", "period_type": "months", "signup_button_text": "Sign Up", "limit_cycles": false, "limit_cycles_num": "2", "limit_cycles_action": "expire", "trial": "1", "trial_days": "90", "trial_amount": "29.94", "trial_once": "1", "group_order": "0", "is_highlighted": false, "plan_code": "", "pricing_title": "coupon testing", "pricing_show_price": true, "pricing_display": "auto", "custom_price": "", "pricing_heading_txt": "", "pricing_footer_txt": "", "pricing_button_txt": "Sign Up", "pricing_button_position": "footer", "pricing_benefits": [ "" ], "register_price_action": "default", "register_price": "", "thank_you_page_enabled": false, "thank_you_page_type": "message", "thank_you_message": "", "thank_you_page_id": "0", "custom_login_urls_enabled": false, "custom_login_urls_default": "", "custom_login_urls": [], "expire_type": "none", "expire_after": "1", "expire_unit": "days", "expire_fixed": "2019-04-04", "tax_exempt": false, "allow_renewal": false, "access_url": "", "disable_address_fields": false, "simultaneous_subscriptions": false, "use_custom_template": false, "custom_template": "template-sitemap.php", "customize_payment_methods": false, "custom_payment_methods": [], "customize_profile_fields": false, "custom_profile_fields": [], "cannot_purchase_message": "You don't have access to purchase this item." } ], "active_txn_count": "1", "expired_txn_count": "0", "trial_txn_count": null, "sub_count": null, "login_count": "1", "first_txn": { "membership": "267", "member": "51", "coupon": "0", "subscription": "64", "id": "180", "amount": "29.94", "total": "29.94", "tax_amount": "0.00", "tax_rate": "0.000", "tax_desc": "", "tax_class": "standard", "trans_num": "ch_1ELDOqJT1LHvX6ILkMCIJteB", "status": "complete", "txn_type": "payment", "gateway": "peum51-1tc", "prorated": "0", "created_at": "2019-04-03 18:01:06", "expires_at": "2019-07-02 23:59:59", "corporate_account_id": "0", "parent_transaction_id": "0", "tax_compound": "0", "tax_shipping": "1", "response": null }, "latest_txn": { "membership": "267", "member": "51", "coupon": "0", "subscription": "64", "id": "180", "amount": "29.94", "total": "29.94", "tax_amount": "0.00", "tax_rate": "0.000", "tax_desc": "", "tax_class": "standard", "trans_num": "ch_1ELDOqJT1LHvX6ILkMCIJteB", "status": "complete", "txn_type": "payment", "gateway": "peum51-1tc", "prorated": "0", "created_at": "2019-04-03 18:01:06", "expires_at": "2019-07-02 23:59:59", "corporate_account_id": "0", "parent_transaction_id": "0", "tax_compound": "0", "tax_shipping": "1", "response": null }, "address": { "mepr-address-one": "123 fake st", "mepr-address-two": "", "mepr-address-city": "city", "mepr-address-state": "UT", "mepr-address-zip": "81111", "mepr-address-country": "US" }, "profile": { "mepr_company_name": "blah", "mepr_birthday": "2019-04-03", "mepr_testslug": "" }, "recent_transactions": [ { "membership": "267", "member": "51", "coupon": "0", "subscription": "64", "id": "180", "amount": "29.94", "total": "29.94", "tax_amount": "0.00", "tax_rate": "0.000", "tax_desc": "", "tax_class": "standard", "trans_num": "ch_1ELDOqJT1LHvX6ILkMCIJteB", "status": "complete", "txn_type": "payment", "gateway": "peum51-1tc", "prorated": "0", "created_at": "2019-04-03 18:01:06", "expires_at": "2019-07-02 23:59:59", "corporate_account_id": "0", "parent_transaction_id": "0", "tax_compound": "0", "tax_shipping": "1", "response": null } ], "recent_subscriptions": [ { "coupon": "0", "membership": "267", "member": "51", "id": "64", "subscr_id": "cus_Eor77sLgMt4sIg", "gateway": "peum51-1tc", "price": "9.99", "period": "1", "period_type": "months", "limit_cycles": "0", "limit_cycles_num": "2", "limit_cycles_action": "expire", "prorated_trial": "0", "trial": "1", "trial_days": "90", "trial_amount": "29.94", "status": "active", "created_at": "2019-04-03 18:01:29", "total": "9.99", "tax_rate": "0.000", "tax_amount": "0.00", "tax_desc": "", "tax_class": "standard", "cc_last4": "1111", "cc_exp_month": "10", "cc_exp_year": "2020", "token": "", "tax_compound": "0", "tax_shipping": "1", "response": null } ] }, { "id": 50, "email": "coupon@testing3.com", "username": "coupon@testing3.com", "nicename": "coupontesting3-com", "url": "", "message": "", "registered_at": "2019-04-03 17:53:28", "first_name": "coupon", "last_name": "testing3", "display_name": "coupon testing3", "active_memberships": [ { "id": 267, "title": "coupon testing", "content": "", "excerpt": "", "date": "2019-04-03 11:18:41", "status": "publish", "author": "5", "date_gmt": "2019-04-03 17:18:41", "modified": "2019-04-04 10:58:44", "modified_gmt": "2019-04-04 16:58:44", "group": "0", "price": "9.99", "period": "1", "period_type": "months", "signup_button_text": "Sign Up", "limit_cycles": false, "limit_cycles_num": "2", "limit_cycles_action": "expire", "trial": "1", "trial_days": "90", "trial_amount": "29.94", "trial_once": "1", "group_order": "0", "is_highlighted": false, "plan_code": "", "pricing_title": "coupon testing", "pricing_show_price": true, "pricing_display": "auto", "custom_price": "", "pricing_heading_txt": "", "pricing_footer_txt": "", "pricing_button_txt": "Sign Up", "pricing_button_position": "footer", "pricing_benefits": [ "" ], "register_price_action": "default", "register_price": "", "thank_you_page_enabled": false, "thank_you_page_type": "message", "thank_you_message": "", "thank_you_page_id": "0", "custom_login_urls_enabled": false, "custom_login_urls_default": "", "custom_login_urls": [], "expire_type": "none", "expire_after": "1", "expire_unit": "days", "expire_fixed": "2019-04-04", "tax_exempt": false, "allow_renewal": false, "access_url": "", "disable_address_fields": false, "simultaneous_subscriptions": false, "use_custom_template": false, "custom_template": "template-sitemap.php", "customize_payment_methods": false, "custom_payment_methods": [], "customize_profile_fields": false, "custom_profile_fields": [], "cannot_purchase_message": "You don't have access to purchase this item." } ], "active_txn_count": "1", "expired_txn_count": "0", "trial_txn_count": null, "sub_count": null, "login_count": "1", "first_txn": { "membership": "267", "member": "50", "coupon": "268", "subscription": "63", "id": "179", "amount": "0.00", "total": "0.00", "tax_amount": "0.00", "tax_rate": "0.000", "tax_desc": "", "tax_class": "standard", "trans_num": "cus_EoqzWnn2NY7UGL", "status": "confirmed", "txn_type": "subscription_confirmation", "gateway": "peum51-1tc", "prorated": "0", "created_at": "2019-04-03 17:53:28", "expires_at": "2019-05-03 23:59:59", "corporate_account_id": "0", "parent_transaction_id": "0", "tax_compound": "0", "tax_shipping": "1", "response": null }, "latest_txn": { "membership": "267", "member": "50", "coupon": "268", "subscription": "63", "id": "179", "amount": "0.00", "total": "0.00", "tax_amount": "0.00", "tax_rate": "0.000", "tax_desc": "", "tax_class": "standard", "trans_num": "cus_EoqzWnn2NY7UGL", "status": "confirmed", "txn_type": "subscription_confirmation", "gateway": "peum51-1tc", "prorated": "0", "created_at": "2019-04-03 17:53:28", "expires_at": "2019-05-03 23:59:59", "corporate_account_id": "0", "parent_transaction_id": "0", "tax_compound": "0", "tax_shipping": "1", "response": null }, "address": { "mepr-address-one": "123 fake st", "mepr-address-two": "", "mepr-address-city": "city", "mepr-address-state": "UT", "mepr-address-zip": "81111", "mepr-address-country": "US" }, "profile": { "mepr_company_name": "blah", "mepr_birthday": "2019-04-03", "mepr_testslug": "" }, "recent_transactions": [ { "membership": "267", "member": "50", "coupon": "268", "subscription": "63", "id": "179", "amount": "0.00", "total": "0.00", "tax_amount": "0.00", "tax_rate": "0.000", "tax_desc": "", "tax_class": "standard", "trans_num": "cus_EoqzWnn2NY7UGL", "status": "confirmed", "txn_type": "subscription_confirmation", "gateway": "peum51-1tc", "prorated": "0", "created_at": "2019-04-03 17:53:28", "expires_at": "2019-05-03 23:59:59", "corporate_account_id": "0", "parent_transaction_id": "0", "tax_compound": "0", "tax_shipping": "1", "response": null } ], "recent_subscriptions": [ { "coupon": "268", "membership": "267", "member": "50", "id": "63", "subscr_id": "cus_EoqzWnn2NY7UGL", "gateway": "peum51-1tc", "price": "9.99", "period": "1", "period_type": "months", "limit_cycles": "0", "limit_cycles_num": "2", "limit_cycles_action": "expire", "prorated_trial": "0", "trial": "1", "trial_days": "30", "trial_amount": "0.00", "status": "active", "created_at": "2019-04-03 17:53:48", "total": "9.99", "tax_rate": "0.000", "tax_amount": "0.00", "tax_desc": "", "tax_class": "standard", "cc_last4": "1111", "cc_exp_month": "10", "cc_exp_year": "2020", "token": "", "tax_compound": "0", "tax_shipping": "1", "response": null } ] }, { "id": 49, "email": "coupon@testing2.com", "username": "coupon@testing2.com", "nicename": "coupontesting2-com", "url": "", "message": "", "registered_at": "2019-04-03 17:33:06", "first_name": "coupon", "last_name": "testing2", "display_name": "coupon testing2", "active_memberships": [ { "id": 267, "title": "coupon testing", "content": "", "excerpt": "", "date": "2019-04-03 11:18:41", "status": "publish", "author": "5", "date_gmt": "2019-04-03 17:18:41", "modified": "2019-04-04 10:58:44", "modified_gmt": "2019-04-04 16:58:44", "group": "0", "price": "9.99", "period": "1", "period_type": "months", "signup_button_text": "Sign Up", "limit_cycles": false, "limit_cycles_num": "2", "limit_cycles_action": "expire", "trial": "1", "trial_days": "90", "trial_amount": "29.94", "trial_once": "1", "group_order": "0", "is_highlighted": false, "plan_code": "", "pricing_title": "coupon testing", "pricing_show_price": true, "pricing_display": "auto", "custom_price": "", "pricing_heading_txt": "", "pricing_footer_txt": "", "pricing_button_txt": "Sign Up", "pricing_button_position": "footer", "pricing_benefits": [ "" ], "register_price_action": "default", "register_price": "", "thank_you_page_enabled": false, "thank_you_page_type": "message", "thank_you_message": "", "thank_you_page_id": "0", "custom_login_urls_enabled": false, "custom_login_urls_default": "", "custom_login_urls": [], "expire_type": "none", "expire_after": "1", "expire_unit": "days", "expire_fixed": "2019-04-04", "tax_exempt": false, "allow_renewal": false, "access_url": "", "disable_address_fields": false, "simultaneous_subscriptions": false, "use_custom_template": false, "custom_template": "template-sitemap.php", "customize_payment_methods": false, "custom_payment_methods": [], "customize_profile_fields": false, "custom_profile_fields": [], "cannot_purchase_message": "You don't have access to purchase this item." } ], "active_txn_count": "1", "expired_txn_count": "0", "trial_txn_count": null, "sub_count": null, "login_count": "1", "first_txn": { "membership": "267", "member": "49", "coupon": "0", "subscription": "62", "id": "178", "amount": "29.94", "total": "29.94", "tax_amount": "0.00", "tax_rate": "0.000", "tax_desc": "", "tax_class": "standard", "trans_num": "ch_1ELCxmJT1LHvX6ILZSGECdgo", "status": "complete", "txn_type": "payment", "gateway": "peum51-1tc", "prorated": "0", "created_at": "2019-04-03 17:33:07", "expires_at": "2019-07-02 23:59:59", "corporate_account_id": "0", "parent_transaction_id": "0", "tax_compound": "0", "tax_shipping": "1", "response": null }, "latest_txn": { "membership": "267", "member": "49", "coupon": "0", "subscription": "62", "id": "178", "amount": "29.94", "total": "29.94", "tax_amount": "0.00", "tax_rate": "0.000", "tax_desc": "", "tax_class": "standard", "trans_num": "ch_1ELCxmJT1LHvX6ILZSGECdgo", "status": "complete", "txn_type": "payment", "gateway": "peum51-1tc", "prorated": "0", "created_at": "2019-04-03 17:33:07", "expires_at": "2019-07-02 23:59:59", "corporate_account_id": "0", "parent_transaction_id": "0", "tax_compound": "0", "tax_shipping": "1", "response": null }, "address": { "mepr-address-one": "123 fake st", "mepr-address-two": "", "mepr-address-city": "city", "mepr-address-state": "UT", "mepr-address-zip": "81111", "mepr-address-country": "US" }, "profile": { "mepr_company_name": "blah", "mepr_birthday": "2019-04-03", "mepr_testslug": "" }, "recent_transactions": [ { "membership": "267", "member": "49", "coupon": "0", "subscription": "62", "id": "178", "amount": "29.94", "total": "29.94", "tax_amount": "0.00", "tax_rate": "0.000", "tax_desc": "", "tax_class": "standard", "trans_num": "ch_1ELCxmJT1LHvX6ILZSGECdgo", "status": "complete", "txn_type": "payment", "gateway": "peum51-1tc", "prorated": "0", "created_at": "2019-04-03 17:33:07", "expires_at": "2019-07-02 23:59:59", "corporate_account_id": "0", "parent_transaction_id": "0", "tax_compound": "0", "tax_shipping": "1", "response": null } ], "recent_subscriptions": [ { "coupon": "0", "membership": "267", "member": "49", "id": "62", "subscr_id": "cus_EoqfMhbLzIxdXZ", "gateway": "peum51-1tc", "price": "9.99", "period": "1", "period_type": "months", "limit_cycles": "0", "limit_cycles_num": "2", "limit_cycles_action": "expire", "prorated_trial": "0", "trial": "1", "trial_days": "90", "trial_amount": "29.94", "status": "active", "created_at": "2019-04-03 17:33:31", "total": "9.99", "tax_rate": "0.000", "tax_amount": "0.00", "tax_desc": "", "tax_class": "standard", "cc_last4": "1111", "cc_exp_month": "10", "cc_exp_year": "2020", "token": "", "tax_compound": "0", "tax_shipping": "1", "response": null } ] }, { "id": 48, "email": "coupon@testing.com", "username": "coupon@testing.com", "nicename": "coupontesting-com", "url": "", "message": "", "registered_at": "2019-04-03 17:21:50", "first_name": "coupon", "last_name": "testing", "display_name": "coupon testing", "active_memberships": [ { "id": 267, "title": "coupon testing", "content": "", "excerpt": "", "date": "2019-04-03 11:18:41", "status": "publish", "author": "5", "date_gmt": "2019-04-03 17:18:41", "modified": "2019-04-04 10:58:44", "modified_gmt": "2019-04-04 16:58:44", "group": "0", "price": "9.99", "period": "1", "period_type": "months", "signup_button_text": "Sign Up", "limit_cycles": false, "limit_cycles_num": "2", "limit_cycles_action": "expire", "trial": "1", "trial_days": "90", "trial_amount": "29.94", "trial_once": "1", "group_order": "0", "is_highlighted": false, "plan_code": "", "pricing_title": "coupon testing", "pricing_show_price": true, "pricing_display": "auto", "custom_price": "", "pricing_heading_txt": "", "pricing_footer_txt": "", "pricing_button_txt": "Sign Up", "pricing_button_position": "footer", "pricing_benefits": [ "" ], "register_price_action": "default", "register_price": "", "thank_you_page_enabled": false, "thank_you_page_type": "message", "thank_you_message": "", "thank_you_page_id": "0", "custom_login_urls_enabled": false, "custom_login_urls_default": "", "custom_login_urls": [], "expire_type": "none", "expire_after": "1", "expire_unit": "days", "expire_fixed": "2019-04-04", "tax_exempt": false, "allow_renewal": false, "access_url": "", "disable_address_fields": false, "simultaneous_subscriptions": false, "use_custom_template": false, "custom_template": "template-sitemap.php", "customize_payment_methods": false, "custom_payment_methods": [], "customize_profile_fields": false, "custom_profile_fields": [], "cannot_purchase_message": "You don't have access to purchase this item." } ], "active_txn_count": "1", "expired_txn_count": "0", "trial_txn_count": null, "sub_count": null, "login_count": "1", "first_txn": { "membership": "267", "member": "48", "coupon": "268", "subscription": "61", "id": "177", "amount": "0.00", "total": "0.00", "tax_amount": "0.00", "tax_rate": "0.000", "tax_desc": "", "tax_class": "standard", "trans_num": "cus_EoqTynS7epcvBN", "status": "confirmed", "txn_type": "subscription_confirmation", "gateway": "peum51-1tc", "prorated": "0", "created_at": "2019-04-03 17:21:50", "expires_at": "2019-05-03 23:59:59", "corporate_account_id": "0", "parent_transaction_id": "0", "tax_compound": "0", "tax_shipping": "1", "response": null }, "latest_txn": { "membership": "267", "member": "48", "coupon": "268", "subscription": "61", "id": "177", "amount": "0.00", "total": "0.00", "tax_amount": "0.00", "tax_rate": "0.000", "tax_desc": "", "tax_class": "standard", "trans_num": "cus_EoqTynS7epcvBN", "status": "confirmed", "txn_type": "subscription_confirmation", "gateway": "peum51-1tc", "prorated": "0", "created_at": "2019-04-03 17:21:50", "expires_at": "2019-05-03 23:59:59", "corporate_account_id": "0", "parent_transaction_id": "0", "tax_compound": "0", "tax_shipping": "1", "response": null }, "address": { "mepr-address-one": "123 fake st", "mepr-address-two": "", "mepr-address-city": "city", "mepr-address-state": "UT", "mepr-address-zip": "81111", "mepr-address-country": "US" }, "profile": { "mepr_company_name": "blah", "mepr_birthday": "2019-04-03", "mepr_testslug": "" }, "recent_transactions": [ { "membership": "267", "member": "48", "coupon": "268", "subscription": "61", "id": "177", "amount": "0.00", "total": "0.00", "tax_amount": "0.00", "tax_rate": "0.000", "tax_desc": "", "tax_class": "standard", "trans_num": "cus_EoqTynS7epcvBN", "status": "confirmed", "txn_type": "subscription_confirmation", "gateway": "peum51-1tc", "prorated": "0", "created_at": "2019-04-03 17:21:50", "expires_at": "2019-05-03 23:59:59", "corporate_account_id": "0", "parent_transaction_id": "0", "tax_compound": "0", "tax_shipping": "1", "response": null } ], "recent_subscriptions": [ { "coupon": "268", "membership": "267", "member": "48", "id": "61", "subscr_id": "cus_EoqTynS7epcvBN", "gateway": "peum51-1tc", "price": "9.99", "period": "1", "period_type": "months", "limit_cycles": "0", "limit_cycles_num": "2", "limit_cycles_action": "expire", "prorated_trial": "0", "trial": "1", "trial_days": "30", "trial_amount": "0.00", "status": "active", "created_at": "2019-04-03 17:21:55", "total": "9.99", "tax_rate": "0.000", "tax_amount": "0.00", "tax_desc": "", "tax_class": "standard", "cc_last4": "1111", "cc_exp_month": "10", "cc_exp_year": "2020", "token": "", "tax_compound": "0", "tax_shipping": "1", "response": null } ] }, { "id": 47, "email": "buddy@test.com", "username": "buddy@test.com", "nicename": "buddytest-com", "url": "", "message": "", "registered_at": "2019-04-01 21:03:59", "first_name": "buddy", "last_name": "test", "display_name": "buddy test", "active_memberships": [ { "id": 15, "title": "Gold Membership", "content": "", "excerpt": "", "date": "2018-08-30 16:10:22", "status": "publish", "author": "2", "date_gmt": "2018-08-30 16:10:22", "modified": "2019-04-01 15:03:22", "modified_gmt": "2019-04-01 21:03:22", "group": "17", "price": "100.00", "period": "1", "period_type": "months", "signup_button_text": "Sign Up", "limit_cycles": false, "limit_cycles_num": "2", "limit_cycles_action": "expire", "trial": false, "trial_days": "0", "trial_amount": "0.00", "trial_once": "1", "group_order": "2", "is_highlighted": false, "plan_code": "", "pricing_title": "Gold Membership", "pricing_show_price": true, "pricing_display": "custom", "custom_price": "Pricing", "pricing_heading_txt": "", "pricing_footer_txt": "", "pricing_button_txt": "Sign Up", "pricing_button_position": "footer", "pricing_benefits": [ "" ], "register_price_action": "default", "register_price": "This is a test", "thank_you_page_enabled": false, "thank_you_page_type": "message", "thank_you_message": "", "thank_you_page_id": "0", "custom_login_urls_enabled": false, "custom_login_urls_default": "", "custom_login_urls": [], "expire_type": "none", "expire_after": "1", "expire_unit": "days", "expire_fixed": "2019-04-01", "tax_exempt": false, "allow_renewal": false, "access_url": "", "disable_address_fields": false, "simultaneous_subscriptions": "1", "use_custom_template": false, "custom_template": "template-sitemap.php", "customize_payment_methods": "1", "custom_payment_methods": [ "peum51-1tc" ], "customize_profile_fields": false, "custom_profile_fields": [], "cannot_purchase_message": "You don't have access to purchase this item." } ], "active_txn_count": "1", "expired_txn_count": "1", "trial_txn_count": null, "sub_count": null, "login_count": "1", "first_txn": { "membership": "15", "member": "47", "coupon": "0", "subscription": "60", "id": "173", "amount": "0.00", "total": "0.00", "tax_amount": "0.00", "tax_rate": "0.000", "tax_desc": "", "tax_class": "standard", "trans_num": "cus_Eo9bZvhtSyBpFV", "status": "confirmed", "txn_type": "subscription_confirmation", "gateway": "peum51-1tc", "prorated": "0", "created_at": "2019-04-01 21:04:00", "expires_at": "2019-04-01 23:59:59", "corporate_account_id": "0", "parent_transaction_id": "0", "tax_compound": "0", "tax_shipping": "1", "response": null }, "latest_txn": { "membership": "15", "member": "47", "coupon": "0", "subscription": "60", "id": "174", "amount": "100.00", "total": "100.00", "tax_amount": "0.00", "tax_rate": "0.000", "tax_desc": "", "tax_class": "standard", "trans_num": "ch_1EKXIWJT1LHvX6ILtZzlyL2d", "status": "complete", "txn_type": "payment", "gateway": "peum51-1tc", "prorated": "0", "created_at": "2019-04-01 21:04:08", "expires_at": "2019-05-01 23:59:59", "corporate_account_id": "0", "parent_transaction_id": "0", "tax_compound": "0", "tax_shipping": "1", "response": null }, "address": { "mepr-address-one": "123 fake st", "mepr-address-two": "", "mepr-address-city": "city", "mepr-address-state": "UT", "mepr-address-zip": "81111", "mepr-address-country": "US" }, "profile": { "mepr_company_name": "blah", "mepr_birthday": "2019-04-11", "mepr_testslug": "" }, "recent_transactions": [ { "membership": "15", "member": "47", "coupon": "0", "subscription": "60", "id": "174", "amount": "100.00", "total": "100.00", "tax_amount": "0.00", "tax_rate": "0.000", "tax_desc": "", "tax_class": "standard", "trans_num": "ch_1EKXIWJT1LHvX6ILtZzlyL2d", "status": "complete", "txn_type": "payment", "gateway": "peum51-1tc", "prorated": "0", "created_at": "2019-04-01 21:04:08", "expires_at": "2019-05-01 23:59:59", "corporate_account_id": "0", "parent_transaction_id": "0", "tax_compound": "0", "tax_shipping": "1", "response": null }, { "membership": "15", "member": "47", "coupon": "0", "subscription": "60", "id": "173", "amount": "0.00", "total": "0.00", "tax_amount": "0.00", "tax_rate": "0.000", "tax_desc": "", "tax_class": "standard", "trans_num": "cus_Eo9bZvhtSyBpFV", "status": "confirmed", "txn_type": "subscription_confirmation", "gateway": "peum51-1tc", "prorated": "0", "created_at": "2019-04-01 21:04:00", "expires_at": "2019-04-01 23:59:59", "corporate_account_id": "0", "parent_transaction_id": "0", "tax_compound": "0", "tax_shipping": "1", "response": null } ], "recent_subscriptions": [ { "coupon": "0", "membership": "15", "member": "47", "id": "60", "subscr_id": "cus_Eo9bZvhtSyBpFV", "gateway": "peum51-1tc", "price": "100.00", "period": "1", "period_type": "months", "limit_cycles": "0", "limit_cycles_num": "2", "limit_cycles_action": "expire", "prorated_trial": "0", "trial": "0", "trial_days": "0", "trial_amount": "0.00", "status": "cancelled", "created_at": "2019-04-01 21:04:05", "total": "100.00", "tax_rate": "0.000", "tax_amount": "0.00", "tax_desc": "", "tax_class": "standard", "cc_last4": "1111", "cc_exp_month": "10", "cc_exp_year": "2020", "token": "", "tax_compound": "0", "tax_shipping": "1", "response": null } ] } ]
Get Member
Description
Get one Member with a given id.
Search Arguments
None
Update Arguments
None
Sample Request
$ curl "http://yourdomain.com/wp-json/mp/v1/members/46" \ -H "MEMBERPRESS-API-KEY: API-KEY-HERE" \
Sample Response
{ "id": 46, "email": "zapier@test.com", "username": "zapier@test.com", "nicename": "zapiertest-com", "url": "", "message": "", "registered_at": "2019-03-19 16:48:20", "first_name": "Zapier", "last_name": "test", "display_name": "zapier@test.com", "active_memberships": [], "active_txn_count": "0", "expired_txn_count": "1", "trial_txn_count": null, "sub_count": null, "login_count": "1", "first_txn": { "membership": "15", "member": "46", "coupon": "0", "subscription": "59", "id": "166", "amount": "0.00", "total": "0.00", "tax_amount": "0.00", "tax_rate": "0.000", "tax_desc": "", "tax_class": "standard", "trans_num": "cus_EjDYhKuKyRY5N2", "status": "confirmed", "txn_type": "subscription_confirmation", "gateway": "peum51-1tc", "prorated": "0", "created_at": "2019-03-19 16:48:21", "expires_at": "2019-03-19 16:48:21", "corporate_account_id": "0", "parent_transaction_id": "0", "tax_compound": "0", "tax_shipping": "1", "response": null }, "latest_txn": { "membership": "15", "member": "46", "coupon": "0", "subscription": "59", "id": "166", "amount": "0.00", "total": "0.00", "tax_amount": "0.00", "tax_rate": "0.000", "tax_desc": "", "tax_class": "standard", "trans_num": "cus_EjDYhKuKyRY5N2", "status": "confirmed", "txn_type": "subscription_confirmation", "gateway": "peum51-1tc", "prorated": "0", "created_at": "2019-03-19 16:48:21", "expires_at": "2019-03-19 16:48:21", "corporate_account_id": "0", "parent_transaction_id": "0", "tax_compound": "0", "tax_shipping": "1", "response": null }, "address": { "mepr-address-one": "123 fake st", "mepr-address-two": "", "mepr-address-city": "city", "mepr-address-state": "UT", "mepr-address-zip": "81111", "mepr-address-country": "US" }, "profile": { "mepr_company_name": "Zapier test", "mepr_birthday": "2019-03-19", "mepr_testslug": "" }, "recent_transactions": [ { "membership": "15", "member": "46", "coupon": "0", "subscription": "59", "id": "167", "amount": "100.00", "total": "100.00", "tax_amount": "0.00", "tax_rate": "0.000", "tax_desc": "", "tax_class": "standard", "trans_num": "ch_1EFl6yJT1LHvX6IL95fhb7M4", "status": "refunded", "txn_type": "payment", "gateway": "peum51-1tc", "prorated": "0", "created_at": "2019-03-19 16:48:28", "expires_at": "2019-04-19 23:59:59", "corporate_account_id": "0", "parent_transaction_id": "0", "tax_compound": "0", "tax_shipping": "1", "response": null }, { "membership": "15", "member": "46", "coupon": "0", "subscription": "59", "id": "166", "amount": "0.00", "total": "0.00", "tax_amount": "0.00", "tax_rate": "0.000", "tax_desc": "", "tax_class": "standard", "trans_num": "cus_EjDYhKuKyRY5N2", "status": "confirmed", "txn_type": "subscription_confirmation", "gateway": "peum51-1tc", "prorated": "0", "created_at": "2019-03-19 16:48:21", "expires_at": "2019-03-19 16:48:21", "corporate_account_id": "0", "parent_transaction_id": "0", "tax_compound": "0", "tax_shipping": "1", "response": null } ], "recent_subscriptions": [ { "coupon": "0", "membership": "15", "member": "46", "id": "59", "subscr_id": "cus_EjDYhKuKyRY5N2", "gateway": "peum51-1tc", "price": "100.00", "period": "1", "period_type": "months", "limit_cycles": "0", "limit_cycles_num": "2", "limit_cycles_action": "expire", "prorated_trial": "0", "trial": "0", "trial_days": "0", "trial_amount": "0.00", "status": "cancelled", "created_at": "2019-03-19 16:48:25", "total": "100.00", "tax_rate": "0.000", "tax_amount": "0.00", "tax_desc": "", "tax_class": "standard", "cc_last4": "1111", "cc_exp_month": "10", "cc_exp_year": "2030", "token": "", "tax_compound": "0", "tax_shipping": "1", "response": null } ] }
Create Member
Description
Create a Member with the given field values.
Search Arguments
None
Update Arguments
first_name (string) – The User's First Name.
last_name (string) – The User's Last Name.
email (Required) (string) – The User's Email Address.
username (Required) (string) -The username for this User. If you're using email addresses as the Username, then both username and email should be set to the same string.
password (string) – Works only when creating a new Member. A plaintext password which will be hashed and stored with this user. If a password is not provided, then a random password will be automatically generated for the member. If this field is present when updating a member, they will receive an email to set their password.
transaction (array, default value: []) – Works only when creating a new Member. This is an array conforming to the documentation for the “Create Transaction” API route (except the “member” parameter will be ignored in favor of the id of the newly created member). This will create an initial transaction for the member to add them to a specific membership.
send_welcome_email (bool, default value: false) – Works only when creating a new Member and if a transaction has been specified. When set to true this will trigger a welcome email to send to the new member. If the user has already received a welcome email, and the membership this transaction is for does not have its own welcome email configured, then no email will be sent.
send_password_email (bool, default value: false) – Works only when creating a new Member. When set to true this will trigger MemberPress set password email (template file for this email is /app/views/emails/user_set_password.php) to be sent to the new member.
address1 (string, default value: empty) – The user's address line 1.
address2 (string, default value: empty) – The user's address line 2.
city (string, default value: empty) – The user's city.
state (string, default value: empty) – The user's state.
zip (string, default value: empty) – The user's zip.
country (string, default value: empty) – The user's country.
usermeta*** more info
Sample Request
$ curl -X POST "http://yourdomain.com/wp-json/mp/v1/members" \ -H "MEMBERPRESS-API-KEY: API-KEY-HERE" \ -d email="zapier@test.com" \ -d username="zapier@test.com" \ -d first_name=Zapier \ -d last_name=test
Sample Response
{ "id": 46, "email": "zapier@test.com", "username": "zapier@test.com", "nicename": "zapiertest-com", "url": "", "message": "", "registered_at": "2019-03-19 16:48:20", "first_name": "Zapier", "last_name": "test", "display_name": "zapier@test.com", "active_memberships": [], "active_txn_count": "0", "expired_txn_count": "1", "trial_txn_count": null, "sub_count": null, "login_count": "1", "first_txn": { "membership": "15", "member": "46", "coupon": "0", "subscription": "59", "id": "166", "amount": "0.00", "total": "0.00", "tax_amount": "0.00", "tax_rate": "0.000", "tax_desc": "", "tax_class": "standard", "trans_num": "cus_EjDYhKuKyRY5N2", "status": "confirmed", "txn_type": "subscription_confirmation", "gateway": "peum51-1tc", "prorated": "0", "created_at": "2019-03-19 16:48:21", "expires_at": "2019-03-19 16:48:21", "corporate_account_id": "0", "parent_transaction_id": "0", "tax_compound": "0", "tax_shipping": "1", "response": null }, "latest_txn": { "membership": "15", "member": "46", "coupon": "0", "subscription": "59", "id": "166", "amount": "0.00", "total": "0.00", "tax_amount": "0.00", "tax_rate": "0.000", "tax_desc": "", "tax_class": "standard", "trans_num": "cus_EjDYhKuKyRY5N2", "status": "confirmed", "txn_type": "subscription_confirmation", "gateway": "peum51-1tc", "prorated": "0", "created_at": "2019-03-19 16:48:21", "expires_at": "2019-03-19 16:48:21", "corporate_account_id": "0", "parent_transaction_id": "0", "tax_compound": "0", "tax_shipping": "1", "response": null }, "address": { "mepr-address-one": "123 fake st", "mepr-address-two": "", "mepr-address-city": "city", "mepr-address-state": "UT", "mepr-address-zip": "81111", "mepr-address-country": "US" }, "profile": { "mepr_company_name": "Zapier test", "mepr_birthday": "2019-03-19", "mepr_testslug": "" }, "recent_transactions": [ { "membership": "15", "member": "46", "coupon": "0", "subscription": "59", "id": "167", "amount": "100.00", "total": "100.00", "tax_amount": "0.00", "tax_rate": "0.000", "tax_desc": "", "tax_class": "standard", "trans_num": "ch_1EFl6yJT1LHvX6IL95fhb7M4", "status": "refunded", "txn_type": "payment", "gateway": "peum51-1tc", "prorated": "0", "created_at": "2019-03-19 16:48:28", "expires_at": "2019-04-19 23:59:59", "corporate_account_id": "0", "parent_transaction_id": "0", "tax_compound": "0", "tax_shipping": "1", "response": null }, { "membership": "15", "member": "46", "coupon": "0", "subscription": "59", "id": "166", "amount": "0.00", "total": "0.00", "tax_amount": "0.00", "tax_rate": "0.000", "tax_desc": "", "tax_class": "standard", "trans_num": "cus_EjDYhKuKyRY5N2", "status": "confirmed", "txn_type": "subscription_confirmation", "gateway": "peum51-1tc", "prorated": "0", "created_at": "2019-03-19 16:48:21", "expires_at": "2019-03-19 16:48:21", "corporate_account_id": "0", "parent_transaction_id": "0", "tax_compound": "0", "tax_shipping": "1", "response": null } ], "recent_subscriptions": [ { "coupon": "0", "membership": "15", "member": "46", "id": "59", "subscr_id": "cus_EjDYhKuKyRY5N2", "gateway": "peum51-1tc", "price": "100.00", "period": "1", "period_type": "months", "limit_cycles": "0", "limit_cycles_num": "2", "limit_cycles_action": "expire", "prorated_trial": "0", "trial": "0", "trial_days": "0", "trial_amount": "0.00", "status": "cancelled", "created_at": "2019-03-19 16:48:25", "total": "100.00", "tax_rate": "0.000", "tax_amount": "0.00", "tax_desc": "", "tax_class": "standard", "cc_last4": "1111", "cc_exp_month": "10", "cc_exp_year": "2030", "token": "", "tax_compound": "0", "tax_shipping": "1", "response": null } ] }
Update Member
Description
Update a Member with the given id and field values.
Search Arguments
None
Update Arguments
first_name (string) – The User's First Name.
last_name (string) – The User's Last Name.
email (Required) (string) – The User's Email Address.
username (Required) (string) -The username for this User. If you're using email addresses as the Username, then both username and email should be set to the same string.
password (string) – Works only when creating a new Member. A plaintext password which will be hashed and stored with this user. If a password is not provided, then a random password will be automatically generated for the member. If this field is present when updating a member, they will receive an email to set their password.
transaction (array, default value: []) – Works only when creating a new Member. This is an array conforming to the documentation for the “Create Transaction” API route (except the “member” parameter will be ignored in favor of the id of the newly created member). This will create an initial transaction for the member to add them to a specific membership.
send_welcome_email (bool, default value: false) – Works only when creating a new Member and if a transaction has been specified. When set to true this will trigger a welcome email to send to the new member. If the user has already received a welcome email, and the membership this transaction is for does not have its own welcome email configured, then no email will be sent.
send_password_email (bool, default value: false) – Works only when creating a new Member. When set to true this will trigger MemberPress set password email (template file for this email is /app/views/emails/user_set_password.php) to be sent to the new member.
address1 (string, default value: empty) – The user's address line 1.
address2 (string, default value: empty) – The user's address line 2.
city (string, default value: empty) – The user's city.
state (string, default value: empty) – The user's state.
zip (string, default value: empty) – The user's zip.
country (string, default value: empty) – The user's country.
usermeta*** more info
Sample Request
$ curl -X POST "http://yourdomain.com/wp-json/mp/v1/members/56" \ -H "MEMBERPRESS-API-KEY: API-KEY-HERE" \ -d email="zapier@test.com" \ -d username=zapiertest \ -d first_name=zapier \ -d last_name=test
Sample Response
{ "id": 56, "email": "zapier@test.com", "username": "zapiertest", "nicename": "zapiertest", "url": "", "message": "", "registered_at": "2019-04-18 16:47:14", "first_name": "zapier", "last_name": "test", "display_name": "zapiertest", "active_memberships": [ { "id": 15, "title": "Gold Membership", "content": "", "excerpt": "", "date": "2018-08-30 16:10:22", "status": "publish", "author": "2", "date_gmt": "2018-08-30 16:10:22", "modified": "2019-04-01 15:03:22", "modified_gmt": "2019-04-01 21:03:22", "group": "17", "price": "100.00", "period": "1", "period_type": "months", "signup_button_text": "Sign Up", "limit_cycles": false, "limit_cycles_num": "2", "limit_cycles_action": "expire", "trial": false, "trial_days": "0", "trial_amount": "0.00", "trial_once": "1", "group_order": "2", "is_highlighted": false, "plan_code": "", "pricing_title": "Gold Membership", "pricing_show_price": true, "pricing_display": "custom", "custom_price": "Pricing", "pricing_heading_txt": "", "pricing_footer_txt": "", "pricing_button_txt": "Sign Up", "pricing_button_position": "footer", "pricing_benefits": [ "" ], "register_price_action": "default", "register_price": "This is a test", "thank_you_page_enabled": false, "thank_you_page_type": "message", "thank_you_message": "", "thank_you_page_id": "0", "custom_login_urls_enabled": false, "custom_login_urls_default": "", "custom_login_urls": [], "expire_type": "none", "expire_after": "1", "expire_unit": "days", "expire_fixed": "2019-04-01", "tax_exempt": false, "allow_renewal": false, "access_url": "", "disable_address_fields": false, "simultaneous_subscriptions": "1", "use_custom_template": false, "custom_template": "template-sitemap.php", "customize_payment_methods": "1", "custom_payment_methods": [ "peum51-1tc" ], "customize_profile_fields": false, "custom_profile_fields": [], "cannot_purchase_message": "You don't have access to purchase this item." }, { "id": 15, "title": "Gold Membership", "content": "", "excerpt": "", "date": "2018-08-30 16:10:22", "status": "publish", "author": "2", "date_gmt": "2018-08-30 16:10:22", "modified": "2019-04-01 15:03:22", "modified_gmt": "2019-04-01 21:03:22", "group": "17", "price": "100.00", "period": "1", "period_type": "months", "signup_button_text": "Sign Up", "limit_cycles": false, "limit_cycles_num": "2", "limit_cycles_action": "expire", "trial": false, "trial_days": "0", "trial_amount": "0.00", "trial_once": "1", "group_order": "2", "is_highlighted": false, "plan_code": "", "pricing_title": "Gold Membership", "pricing_show_price": true, "pricing_display": "custom", "custom_price": "Pricing", "pricing_heading_txt": "", "pricing_footer_txt": "", "pricing_button_txt": "Sign Up", "pricing_button_position": "footer", "pricing_benefits": [ "" ], "register_price_action": "default", "register_price": "This is a test", "thank_you_page_enabled": false, "thank_you_page_type": "message", "thank_you_message": "", "thank_you_page_id": "0", "custom_login_urls_enabled": false, "custom_login_urls_default": "", "custom_login_urls": [], "expire_type": "none", "expire_after": "1", "expire_unit": "days", "expire_fixed": "2019-04-01", "tax_exempt": false, "allow_renewal": false, "access_url": "", "disable_address_fields": false, "simultaneous_subscriptions": "1", "use_custom_template": false, "custom_template": "template-sitemap.php", "customize_payment_methods": "1", "custom_payment_methods": [ "peum51-1tc" ], "customize_profile_fields": false, "custom_profile_fields": [], "cannot_purchase_message": "You don't have access to purchase this item." } ], "active_txn_count": "2", "expired_txn_count": "0", "trial_txn_count": null, "sub_count": null, "login_count": "1", "first_txn": { "membership": "15", "member": "56", "coupon": "0", "subscription": "69", "id": "198", "amount": "0.00", "total": "0.00", "tax_amount": "0.00", "tax_rate": "0.000", "tax_desc": "", "tax_class": "standard", "trans_num": "cus_EuSIHGllVD3168", "status": "confirmed", "txn_type": "subscription_confirmation", "gateway": "peum51-1tc", "prorated": "0", "created_at": "2019-04-18 16:47:14", "expires_at": "2019-04-18 23:59:59", "corporate_account_id": "0", "parent_transaction_id": "0", "tax_compound": "0", "tax_shipping": "1", "response": null }, "latest_txn": { "membership": "15", "member": "56", "coupon": "0", "subscription": "69", "id": "199", "amount": "100.00", "total": "100.00", "tax_amount": "0.00", "tax_rate": "0.000", "tax_desc": "", "tax_class": "standard", "trans_num": "ch_1EQdOLJT1LHvX6ILZhIzeboJ", "status": "complete", "txn_type": "payment", "gateway": "peum51-1tc", "prorated": "0", "created_at": "2019-04-18 16:47:21", "expires_at": "2019-05-18 23:59:59", "corporate_account_id": "0", "parent_transaction_id": "0", "tax_compound": "0", "tax_shipping": "1", "response": null }, "address": { "mepr-address-one": "123 fake st", "mepr-address-two": "", "mepr-address-city": "city", "mepr-address-state": "UT", "mepr-address-zip": "81111", "mepr-address-country": "US" }, "profile": { "mepr_company_name": "MemberPress", "mepr_birthday": "2019-04-18", "mepr_testslug": "" }, "recent_transactions": [ { "membership": "15", "member": "56", "coupon": "0", "subscription": "69", "id": "199", "amount": "100.00", "total": "100.00", "tax_amount": "0.00", "tax_rate": "0.000", "tax_desc": "", "tax_class": "standard", "trans_num": "ch_1EQdOLJT1LHvX6ILZhIzeboJ", "status": "complete", "txn_type": "payment", "gateway": "peum51-1tc", "prorated": "0", "created_at": "2019-04-18 16:47:21", "expires_at": "2019-05-18 23:59:59", "corporate_account_id": "0", "parent_transaction_id": "0", "tax_compound": "0", "tax_shipping": "1", "response": null }, { "membership": "15", "member": "56", "coupon": "0", "subscription": "69", "id": "198", "amount": "0.00", "total": "0.00", "tax_amount": "0.00", "tax_rate": "0.000", "tax_desc": "", "tax_class": "standard", "trans_num": "cus_EuSIHGllVD3168", "status": "confirmed", "txn_type": "subscription_confirmation", "gateway": "peum51-1tc", "prorated": "0", "created_at": "2019-04-18 16:47:14", "expires_at": "2019-04-18 23:59:59", "corporate_account_id": "0", "parent_transaction_id": "0", "tax_compound": "0", "tax_shipping": "1", "response": null } ], "recent_subscriptions": [ { "coupon": "0", "membership": "15", "member": "56", "id": "69", "subscr_id": "cus_EuSIHGllVD3168", "gateway": "peum51-1tc", "price": "100.00", "period": "1", "period_type": "months", "limit_cycles": "0", "limit_cycles_num": "2", "limit_cycles_action": "expire", "prorated_trial": "0", "trial": "0", "trial_days": "0", "trial_amount": "0.00", "status": "active", "created_at": "2019-04-18 16:47:19", "total": "100.00", "tax_rate": "0.000", "tax_amount": "0.00", "tax_desc": "", "tax_class": "standard", "cc_last4": "1111", "cc_exp_month": "10", "cc_exp_year": "2020", "token": "", "tax_compound": "0", "tax_shipping": "1", "response": null } ] }
Delete Member
Description
Delete a Member with the given id.
Search Arguments
None
Update Arguments
None
Sample Request
$ curl -X DELETE "http://yourdomain.com/wp-json/mp/v1/members/56" \ -H "MEMBERPRESS-API-KEY: API-KEY-HERE" \
Sample Response
{ "id": 56, "email": "zapier@test.com", "username": "zapiertest", "nicename": "zapiertest", "url": "", "message": "", "registered_at": "2019-04-18 16:47:14", "first_name": "zapier", "last_name": "test", "display_name": "zapiertest", "active_memberships": [ { "id": 15, "title": "Gold Membership", "content": "", "excerpt": "", "date": "2018-08-30 16:10:22", "status": "publish", "author": "2", "date_gmt": "2018-08-30 16:10:22", "modified": "2019-04-01 15:03:22", "modified_gmt": "2019-04-01 21:03:22", "group": "17", "price": "100.00", "period": "1", "period_type": "months", "signup_button_text": "Sign Up", "limit_cycles": false, "limit_cycles_num": "2", "limit_cycles_action": "expire", "trial": false, "trial_days": "0", "trial_amount": "0.00", "trial_once": "1", "group_order": "2", "is_highlighted": false, "plan_code": "", "pricing_title": "Gold Membership", "pricing_show_price": true, "pricing_display": "custom", "custom_price": "Pricing", "pricing_heading_txt": "", "pricing_footer_txt": "", "pricing_button_txt": "Sign Up", "pricing_button_position": "footer", "pricing_benefits": [ "" ], "register_price_action": "default", "register_price": "This is a test", "thank_you_page_enabled": false, "thank_you_page_type": "message", "thank_you_message": "", "thank_you_page_id": "0", "custom_login_urls_enabled": false, "custom_login_urls_default": "", "custom_login_urls": [], "expire_type": "none", "expire_after": "1", "expire_unit": "days", "expire_fixed": "2019-04-01", "tax_exempt": false, "allow_renewal": false, "access_url": "", "disable_address_fields": false, "simultaneous_subscriptions": "1", "use_custom_template": false, "custom_template": "template-sitemap.php", "customize_payment_methods": "1", "custom_payment_methods": [ "peum51-1tc" ], "customize_profile_fields": false, "custom_profile_fields": [], "cannot_purchase_message": "You don't have access to purchase this item." }, { "id": 15, "title": "Gold Membership", "content": "", "excerpt": "", "date": "2018-08-30 16:10:22", "status": "publish", "author": "2", "date_gmt": "2018-08-30 16:10:22", "modified": "2019-04-01 15:03:22", "modified_gmt": "2019-04-01 21:03:22", "group": "17", "price": "100.00", "period": "1", "period_type": "months", "signup_button_text": "Sign Up", "limit_cycles": false, "limit_cycles_num": "2", "limit_cycles_action": "expire", "trial": false, "trial_days": "0", "trial_amount": "0.00", "trial_once": "1", "group_order": "2", "is_highlighted": false, "plan_code": "", "pricing_title": "Gold Membership", "pricing_show_price": true, "pricing_display": "custom", "custom_price": "Pricing", "pricing_heading_txt": "", "pricing_footer_txt": "", "pricing_button_txt": "Sign Up", "pricing_button_position": "footer", "pricing_benefits": [ "" ], "register_price_action": "default", "register_price": "This is a test", "thank_you_page_enabled": false, "thank_you_page_type": "message", "thank_you_message": "", "thank_you_page_id": "0", "custom_login_urls_enabled": false, "custom_login_urls_default": "", "custom_login_urls": [], "expire_type": "none", "expire_after": "1", "expire_unit": "days", "expire_fixed": "2019-04-01", "tax_exempt": false, "allow_renewal": false, "access_url": "", "disable_address_fields": false, "simultaneous_subscriptions": "1", "use_custom_template": false, "custom_template": "template-sitemap.php", "customize_payment_methods": "1", "custom_payment_methods": [ "peum51-1tc" ], "customize_profile_fields": false, "custom_profile_fields": [], "cannot_purchase_message": "You don't have access to purchase this item." } ], "active_txn_count": "2", "expired_txn_count": "0", "trial_txn_count": null, "sub_count": null, "login_count": "1", "first_txn": { "membership": "15", "member": "56", "coupon": "0", "subscription": "69", "id": "198", "amount": "0.00", "total": "0.00", "tax_amount": "0.00", "tax_rate": "0.000", "tax_desc": "", "tax_class": "standard", "trans_num": "cus_EuSIHGllVD3168", "status": "confirmed", "txn_type": "subscription_confirmation", "gateway": "peum51-1tc", "prorated": "0", "created_at": "2019-04-18 16:47:14", "expires_at": "2019-04-18 23:59:59", "corporate_account_id": "0", "parent_transaction_id": "0", "tax_compound": "0", "tax_shipping": "1", "response": null }, "latest_txn": { "membership": "15", "member": "56", "coupon": "0", "subscription": "69", "id": "199", "amount": "100.00", "total": "100.00", "tax_amount": "0.00", "tax_rate": "0.000", "tax_desc": "", "tax_class": "standard", "trans_num": "ch_1EQdOLJT1LHvX6ILZhIzeboJ", "status": "complete", "txn_type": "payment", "gateway": "peum51-1tc", "prorated": "0", "created_at": "2019-04-18 16:47:21", "expires_at": "2019-05-18 23:59:59", "corporate_account_id": "0", "parent_transaction_id": "0", "tax_compound": "0", "tax_shipping": "1", "response": null }, "address": { "mepr-address-one": "123 fake st", "mepr-address-two": "", "mepr-address-city": "city", "mepr-address-state": "UT", "mepr-address-zip": "81111", "mepr-address-country": "US" }, "profile": { "mepr_company_name": "MemberPress", "mepr_birthday": "2019-04-18", "mepr_testslug": "" }, "recent_transactions": [ { "membership": "15", "member": "56", "coupon": "0", "subscription": "69", "id": "199", "amount": "100.00", "total": "100.00", "tax_amount": "0.00", "tax_rate": "0.000", "tax_desc": "", "tax_class": "standard", "trans_num": "ch_1EQdOLJT1LHvX6ILZhIzeboJ", "status": "complete", "txn_type": "payment", "gateway": "peum51-1tc", "prorated": "0", "created_at": "2019-04-18 16:47:21", "expires_at": "2019-05-18 23:59:59", "corporate_account_id": "0", "parent_transaction_id": "0", "tax_compound": "0", "tax_shipping": "1", "response": null }, { "membership": "15", "member": "56", "coupon": "0", "subscription": "69", "id": "198", "amount": "0.00", "total": "0.00", "tax_amount": "0.00", "tax_rate": "0.000", "tax_desc": "", "tax_class": "standard", "trans_num": "cus_EuSIHGllVD3168", "status": "confirmed", "txn_type": "subscription_confirmation", "gateway": "peum51-1tc", "prorated": "0", "created_at": "2019-04-18 16:47:14", "expires_at": "2019-04-18 23:59:59", "corporate_account_id": "0", "parent_transaction_id": "0", "tax_compound": "0", "tax_shipping": "1", "response": null } ], "recent_subscriptions": [ { "coupon": "0", "membership": "15", "member": "56", "id": "69", "subscr_id": "cus_EuSIHGllVD3168", "gateway": "peum51-1tc", "price": "100.00", "period": "1", "period_type": "months", "limit_cycles": "0", "limit_cycles_num": "2", "limit_cycles_action": "expire", "prorated_trial": "0", "trial": "0", "trial_days": "0", "trial_amount": "0.00", "status": "active", "created_at": "2019-04-18 16:47:19", "total": "100.00", "tax_rate": "0.000", "tax_amount": "0.00", "tax_desc": "", "tax_class": "standard", "cc_last4": "1111", "cc_exp_month": "10", "cc_exp_year": "2020", "token": "", "tax_compound": "0", "tax_shipping": "1", "response": null } ] }
Get Rules
Description
Get all Rules based on the search arguments provided.
Search Arguments
page (integer, default value: 1) – Current page of the collection.
per_page (integer, default value: 10) – Maximum number of items to be returned in result set.
search (string) – Limit results to those matching a string.
Update Arguments
None
Sample Request
$ curl -X POST "http://yourdomain.com/wp-json/mp/v1/rules?page=2&per_page=10" \ -H "MEMBERPRESS-API-KEY: API-KEY-HERE" \
Sample Response
[ { "id": 227, "title": "A Single Page: Test page", "date": "2019-02-20 10:34:06", "status": "publish", "author": { "id": 5, "email": "zapier@test.com", "username": "zapiertest", "nicename": "zapiertest", "url": "http://zapier.test.com", "message": "", "registered_at": "2018-08-30 16:42:13", "first_name": "zapier", "last_name": "test", "display_name": "zapier test" }, "date_gmt": "2019-02-20 17:34:06", "modified": "2019-02-20 10:34:06", "modified_gmt": "2019-02-20 17:34:06", "rule_type": "single_page", "rule_content": "225", "is_rule_content_regex": false, "drip_enabled": false, "drip_amount": "0", "drip_unit": "days", "drip_after": "registers", "drip_after_fixed": "", "expires_enabled": false, "expires_amount": "0", "expires_unit": "days", "expires_after": "registers", "expires_after_fixed": "", "unauth_excerpt_type": "default", "unauth_excerpt_size": "100", "unauth_message_type": "default", "unauth_message": "", "unauth_login": "default", "auto_gen_title": "1" }, { "id": 175, "title": "Partial:", "date": "2018-12-14 14:57:43", "status": "publish", "author": { "id": 5, "email": "zapier@test.com", "username": "zapiertest", "nicename": "zapiertest", "url": "http://zapier.test.com", "message": "", "registered_at": "2018-08-30 16:42:13", "first_name": "zapier", "last_name": "test", "display_name": "zapier test" }, "date_gmt": "2018-12-14 21:57:43", "modified": "2018-12-14 14:57:43", "modified_gmt": "2018-12-14 21:57:43", "rule_type": "partial", "rule_content": "", "is_rule_content_regex": false, "drip_enabled": false, "drip_amount": "0", "drip_unit": "days", "drip_after": "registers", "drip_after_fixed": "", "expires_enabled": false, "expires_amount": "0", "expires_unit": "days", "expires_after": "registers", "expires_after_fixed": "", "unauth_excerpt_type": "default", "unauth_excerpt_size": "100", "unauth_message_type": "default", "unauth_message": "", "unauth_login": "default", "auto_gen_title": "1" }, { "id": 77, "title": "A Single Forum: Forum 1", "date": "2018-09-13 16:41:59", "status": "publish", "author": { "id": 2, "email": "", "username": "demo", "nicename": "demo", "url": "", "message": "", "registered_at": "2018-08-30 16:27:02", "first_name": "", "last_name": "", "display_name": "demo" }, "date_gmt": "2018-09-13 22:41:59", "modified": "2018-09-13 16:41:59", "modified_gmt": "2018-09-13 22:41:59", "rule_type": "single_forum", "rule_content": "73", "is_rule_content_regex": false, "drip_enabled": false, "drip_amount": "0", "drip_unit": "days", "drip_after": "registers", "drip_after_fixed": "", "expires_enabled": false, "expires_amount": "0", "expires_unit": "days", "expires_after": "registers", "expires_after_fixed": "", "unauth_excerpt_type": "default", "unauth_excerpt_size": "100", "unauth_message_type": "default", "unauth_message": "", "unauth_login": "default", "auto_gen_title": "1" }, { "id": 23, "title": "A Single Page: Sample Page", "date": "2018-08-30 16:14:57", "status": "publish", "author": { "id": 2, "email": "", "username": "demo", "nicename": "demo", "url": "", "message": "", "registered_at": "2018-08-30 16:27:02", "first_name": "", "last_name": "", "display_name": "demo" }, "date_gmt": "2018-08-30 16:14:57", "modified": "2018-12-19 10:48:44", "modified_gmt": "2018-12-19 17:48:44", "rule_type": "single_page", "rule_content": "2", "is_rule_content_regex": false, "drip_enabled": false, "drip_amount": "0", "drip_unit": "days", "drip_after": "registers", "drip_after_fixed": "", "expires_enabled": false, "expires_amount": "0", "expires_unit": "days", "expires_after": "registers", "expires_after_fixed": "", "unauth_excerpt_type": "default", "unauth_excerpt_size": "100", "unauth_message_type": "default", "unauth_message": "", "unauth_login": "default", "auto_gen_title": "1" } ]
Get Rule
Description
Get one Rule with a given id.
Search Arguments
None
Update Arguments
None
Sample Request
$ curl "http://yourdomain.com/wp-json/mp/v1/rules/227" \ -H "MEMBERPRESS-API-KEY: API-KEY-HERE" \
Sample Response
{ "id": 227, "title": "A Single Page: Test page", "date": "2019-02-20 10:34:06", "status": "publish", "author": { "id": 5, "email": "zapier@test.com", "username": "zapiertest", "nicename": "zapiertest", "url": "http://zapier.test.com", "message": "", "registered_at": "2018-08-30 16:42:13", "first_name": "zapier", "last_name": "test", "display_name": "zapier test" }, "date_gmt": "2019-02-20 17:34:06", "modified": "2019-02-20 10:34:06", "modified_gmt": "2019-02-20 17:34:06", "rule_type": "single_page", "rule_content": "225", "is_rule_content_regex": false, "drip_enabled": false, "drip_amount": "0", "drip_unit": "days", "drip_after": "registers", "drip_after_fixed": "", "expires_enabled": false, "expires_amount": "0", "expires_unit": "days", "expires_after": "registers", "expires_after_fixed": "", "unauth_excerpt_type": "default", "unauth_excerpt_size": "100", "unauth_message_type": "default", "unauth_message": "", "unauth_login": "default", "auto_gen_title": "1" }
Create Rule
Description
Create a Rule with the given field values.
Search Arguments
None
Update Arguments
rule_type (string, default value: all) – The type of Rule you are creating.
rule_content (string) – The ID of the rule_type being protected. For example, if you protect a Single Page, then you would set this to the ID of that page. If you protect an entire category, then you would set this to the ID of that category.
is_rule_content_regex (bool, default value: false) – Whether to use Regular Expression matching on “custom” (aka Custom URI) rule_type's.
authorized_memberships (Required) (array, default value: []) – An array of Membership ID's which grant the Member access to the Content being protected by this Rule.
drip_enabled (bool, default value: false) – Whether Dripping should be enabled on this Rule.
drip_amount (integer, default value: 1) – The number of units to delay Dripping by.
drip_unit (string, default value: days) – The unit to Drip the Content by.
drip_after (string, default value: registers) – The date to base the Dripping off of.
drip_after_fixed (string) – If drip_after is set to “fixed”, then this is required and must be a valid date in the future which PHP's strtotime() function can interpret.
expires_enabled (bool, default value: false) – Whether Content Expiration should be enabled on this Rule.
expires_amount (integer, default value: 1) – The number of units to delay Content Expiration by.
expire_unit (string, default value: days) – The unit to Expire the Content by.
expire_after (string, default value: registers) – The date to base the Content Expiration off of.
expires_after_fixed (string) – If expires_after is set to “fixed”, then this is required and must be a valid date in the future which PHP's strtotime() function can interpret.
unauth_excerpt_type (string, default value: default) – The type of excerpt from the protected Content to show to unauthorized visitors. If set to anything other than “default” this will override the global behavior set in the MemberPress Options for any Content protected by this Rule.
unauth_excerpt_size (integer, default value: 100) – This is only used if unauth_exceprt_type is set to “custom”. It will show X characters of the actual protected Content as the excerpt to unauthorized visitors.
unath_message_type (string, default value: default) – The type of message to show to unauthorized users trying to view Content protected by this Rule. If set to anything other than “default” this will override the global behavior set in the MemberPress Options for any Content protected by this Rule.
unauth_message (string) – If the unauth_message_type is set to “custom”, then this string will be shown as the message which unauthorized users will see when they try to view Content protected by this Rule.
unauth_login (string, default value: default) – Whether or not to show/hide the Login Form, or leave at the default global settings in the MemberPress Options.
Sample Request
$ curl -X POST "http://yourdomain.com/wp-json/mp/v1/rules" \ -H "MEMBERPRESS-API-KEY: API-KEY-HERE" \ -d rule_type=single_page \ -d rule_content=225 \ -d drip_unit=days \ -d drip_after=registers \ -d expires_unit=days \ -d expires_after=registers \ -d unauth_excerpt_type=default \ -d unauth_excerpt_size=100 \ -d unauth_message_type=default \ -d unauth_login=default
Sample Response
{ "id": 227, "title": "A Single Page: Test page", "date": "2019-02-20 10:34:06", "status": "publish", "author": { "id": 5, "email": "zapier@test.com", "username": "zapiertest", "nicename": "zapiertest", "url": "http://zapier.test.com", "message": "", "registered_at": "2018-08-30 16:42:13", "first_name": "zapier", "last_name": "test", "display_name": "zapier test" }, "date_gmt": "2019-02-20 17:34:06", "modified": "2019-02-20 10:34:06", "modified_gmt": "2019-02-20 17:34:06", "rule_type": "single_page", "rule_content": "225", "is_rule_content_regex": false, "drip_enabled": false, "drip_amount": "0", "drip_unit": "days", "drip_after": "registers", "drip_after_fixed": "", "expires_enabled": false, "expires_amount": "0", "expires_unit": "days", "expires_after": "registers", "expires_after_fixed": "", "unauth_excerpt_type": "default", "unauth_excerpt_size": "100", "unauth_message_type": "default", "unauth_message": "", "unauth_login": "default", "auto_gen_title": "1" }
Update Rule
Description
Update a Rule with the given id and field values.
Search Arguments
None
Update Arguments
rule_type (string, default value: all) – The type of Rule you are creating.
rule_content (string) – The ID of the rule_type being protected. For example, if you protect a Single Page, then you would set this to the ID of that page. If you protect an entire category, then you would set this to the ID of that category.
is_rule_content_regex (bool, default value: false) – Whether to use Regular Expression matching on “custom” (aka Custom URI) rule_type's.
authorized_memberships (Required) (array, default value: []) – An array of Membership ID's which grant the Member access to the Content being protected by this Rule.
drip_enabled (bool, default value: false) – Whether Dripping should be enabled on this Rule.
drip_amount (integer, default value: 1) – The number of units to delay Dripping by.
drip_unit (string, default value: days) – The unit to Drip the Content by.
drip_after (string, default value: registers) – The date to base the Dripping off of.
drip_after_fixed (string) – If drip_after is set to “fixed”, then this is required and must be a valid date in the future which PHP's strtotime() function can interpret.
expires_enabled (bool, default value: false) – Whether Content Expiration should be enabled on this Rule.
expires_amount (integer, default value: 1) – The number of units to delay Content Expiration by.
expire_unit (string, default value: days) – The unit to Expire the Content by.
expire_after (string, default value: registers) – The date to base the Content Expiration off of.
expires_after_fixed (string) – If expires_after is set to “fixed”, then this is required and must be a valid date in the future which PHP's strtotime() function can interpret.
unauth_excerpt_type (string, default value: default) – The type of excerpt from the protected Content to show to unauthorized visitors. If set to anything other than “default” this will override the global behavior set in the MemberPress Options for any Content protected by this Rule.
unauth_excerpt_size (integer, default value: 100) – This is only used if unauth_exceprt_type is set to “custom”. It will show X characters of the actual protected Content as the excerpt to unauthorized visitors.
unath_message_type (string, default value: default) – The type of message to show to unauthorized users trying to view Content protected by this Rule. If set to anything other than “default” this will override the global behavior set in the MemberPress Options for any Content protected by this Rule.
unauth_message (string) – If the unauth_message_type is set to “custom”, then this string will be shown as the message which unauthorized users will see when they try to view Content protected by this Rule.
unauth_login (string, default value: default) – Whether or not to show/hide the Login Form, or leave at the default global settings in the MemberPress Options.
Sample Request
$ curl -X POST "http://yourdomain.com/wp-json/mp/v1/rules/227" \ -H "MEMBERPRESS-API-KEY: API-KEY-HERE" \ -d rule_type=single_page \ -d rule_content=225 \ -d drip_unit=days \ -d drip_after=registers \ -d expires_unit=days \ -d expires_after=registers \ -d unauth_excerpt_type=default \ -d unauth_excerpt_size=100 \ -d unauth_message_type=default \ -d unauth_login=default
Sample Response
{ "id": 227, "title": "A Single Page: Test page", "date": "2019-02-20 10:34:06", "status": "publish", "author": { "id": 5, "email": "zapier@test.com", "username": "zapiertest", "nicename": "zapiertest", "url": "http://zapier.test.com", "message": "", "registered_at": "2018-08-30 16:42:13", "first_name": "zapier", "last_name": "test", "display_name": "zapier test" }, "date_gmt": "2019-02-20 17:34:06", "modified": "2019-02-20 10:34:06", "modified_gmt": "2019-02-20 17:34:06", "rule_type": "single_page", "rule_content": "225", "is_rule_content_regex": false, "drip_enabled": false, "drip_amount": "0", "drip_unit": "days", "drip_after": "registers", "drip_after_fixed": "", "expires_enabled": false, "expires_amount": "0", "expires_unit": "days", "expires_after": "registers", "expires_after_fixed": "", "unauth_excerpt_type": "default", "unauth_excerpt_size": "100", "unauth_message_type": "default", "unauth_message": "", "unauth_login": "default", "auto_gen_title": "1" }
Delete Rule
Description
Delete a Rule with the given id.
Search Arguments
None
Update Arguments
None
Sample Request
$ curl -X DELETE "http://yourdomain.com/wp-json/mp/v1/rules/227" \ -H "MEMBERPRESS-API-KEY: API-KEY-HERE" \
Sample Response
{ "id": 227, "title": "A Single Page: Test page", "date": "2019-02-20 10:34:06", "status": "publish", "author": { "id": 5, "email": "zapier@test.com", "username": "zapiertest", "nicename": "zapiertest", "url": "http://zapier.test.com", "message": "", "registered_at": "2018-08-30 16:42:13", "first_name": "zapier", "last_name": "test", "display_name": "zapier test" }, "date_gmt": "2019-02-20 17:34:06", "modified": "2019-02-20 10:34:06", "modified_gmt": "2019-02-20 17:34:06", "rule_type": "single_page", "rule_content": "225", "is_rule_content_regex": false, "drip_enabled": false, "drip_amount": "0", "drip_unit": "days", "drip_after": "registers", "drip_after_fixed": "", "expires_enabled": false, "expires_amount": "0", "expires_unit": "days", "expires_after": "registers", "expires_after_fixed": "", "unauth_excerpt_type": "default", "unauth_excerpt_size": "100", "unauth_message_type": "default", "unauth_message": "", "unauth_login": "default", "auto_gen_title": "1" }
Get Memberships
Description
Get all Memberships based on the search arguments provided.
Search Arguments
page (integer, default value: 1) – Current page of the collection.
per_page (integer, default value: 10) – Maximum number of items to be returned in result set.
search (string) – Limit results to those matching a string.
group (integer) – Limit results to those matching a specific group.
Update Arguments
None
Sample Request
$ curl "http://yourdomain.com/wp-json/mp/v1/memberships?page=2&per_page=10" \ -H "MEMBERPRESS-API-KEY: API-KEY-HERE" \
Sample Response
[ { "id": 274, "title": "3 day free trial", "content": "", "excerpt": "", "date": "2019-04-10 12:05:01", "status": "publish", "author": { "id": 5, "email": "zapier@test.com", "username": "zapiertest", "nicename": "zapiertest", "url": "http://zapier.test.com", "message": "", "registered_at": "2018-08-30 16:42:13", "first_name": "zapier", "last_name": "test", "display_name": "zapier test" }, "date_gmt": "2019-04-10 18:05:01", "modified": "2019-04-10 12:05:01", "modified_gmt": "2019-04-10 18:05:01", "group": "0", "price": "25.00", "period": "1", "period_type": "months", "signup_button_text": "Sign Up", "limit_cycles": false, "limit_cycles_num": "2", "limit_cycles_action": "expire", "trial": "1", "trial_days": "3", "trial_amount": "0.00", "trial_once": "1", "group_order": "0", "is_highlighted": false, "plan_code": "", "pricing_title": "3 day free trial", "pricing_show_price": true, "pricing_display": "auto", "custom_price": "", "pricing_heading_txt": "", "pricing_footer_txt": "", "pricing_button_txt": "Sign Up", "pricing_button_position": "footer", "pricing_benefits": [ "" ], "register_price_action": "default", "register_price": "", "thank_you_page_enabled": false, "thank_you_page_type": "message", "thank_you_message": "", "thank_you_page_id": "0", "custom_login_urls_enabled": false, "custom_login_urls_default": "", "custom_login_urls": [], "expire_type": "none", "expire_after": "1", "expire_unit": "days", "expire_fixed": "2019-04-10", "tax_exempt": false, "allow_renewal": false, "access_url": "", "disable_address_fields": false, "simultaneous_subscriptions": false, "use_custom_template": false, "custom_template": "template-sitemap.php", "customize_payment_methods": false, "custom_payment_methods": [], "customize_profile_fields": false, "custom_profile_fields": [], "cannot_purchase_message": "You don't have access to purchase this item." }, { "id": 271, "title": "One day membership", "content": "", "excerpt": "", "date": "2019-04-04 12:14:54", "status": "publish", "author": { "id": 5, "email": "zapier@test.com", "username": "zapiertest", "nicename": "zapiertest", "url": "http://zapier.test.com", "message": "", "registered_at": "2018-08-30 16:42:13", "first_name": "zapier", "last_name": "test", "display_name": "zapier test" }, "date_gmt": "2019-04-04 18:14:54", "modified": "2019-04-04 12:14:54", "modified_gmt": "2019-04-04 18:14:54", "group": "0", "price": "10.00", "period": "1", "period_type": "lifetime", "signup_button_text": "Sign Up", "limit_cycles": false, "limit_cycles_num": "2", "limit_cycles_action": "expire", "trial": false, "trial_days": "0", "trial_amount": "0.00", "trial_once": "1", "group_order": "0", "is_highlighted": false, "plan_code": "", "pricing_title": "One day membership", "pricing_show_price": true, "pricing_display": "auto", "custom_price": "", "pricing_heading_txt": "", "pricing_footer_txt": "", "pricing_button_txt": "Sign Up", "pricing_button_position": "footer", "pricing_benefits": [ "" ], "register_price_action": "default", "register_price": "", "thank_you_page_enabled": false, "thank_you_page_type": "message", "thank_you_message": "", "thank_you_page_id": "0", "custom_login_urls_enabled": false, "custom_login_urls_default": "", "custom_login_urls": [], "expire_type": "delay", "expire_after": "1", "expire_unit": "days", "expire_fixed": "2019-04-04", "tax_exempt": false, "allow_renewal": false, "access_url": "", "disable_address_fields": false, "simultaneous_subscriptions": false, "use_custom_template": false, "custom_template": "template-sitemap.php", "customize_payment_methods": false, "custom_payment_methods": [], "customize_profile_fields": false, "custom_profile_fields": [], "cannot_purchase_message": "You don't have access to purchase this item." }, { "id": 267, "title": "coupon testing", "content": "", "excerpt": "", "date": "2019-04-03 11:18:41", "status": "publish", "author": { "id": 5, "email": "zapier@test.com", "username": "zapiertest", "nicename": "zapiertest", "url": "http://zapier.test.com", "message": "", "registered_at": "2018-08-30 16:42:13", "first_name": "zapier", "last_name": "test", "display_name": "zapier test" }, "date_gmt": "2019-04-03 17:18:41", "modified": "2019-04-04 10:58:44", "modified_gmt": "2019-04-04 16:58:44", "group": "0", "price": "9.99", "period": "1", "period_type": "months", "signup_button_text": "Sign Up", "limit_cycles": false, "limit_cycles_num": "2", "limit_cycles_action": "expire", "trial": "1", "trial_days": "90", "trial_amount": "29.94", "trial_once": "1", "group_order": "0", "is_highlighted": false, "plan_code": "", "pricing_title": "coupon testing", "pricing_show_price": true, "pricing_display": "auto", "custom_price": "", "pricing_heading_txt": "", "pricing_footer_txt": "", "pricing_button_txt": "Sign Up", "pricing_button_position": "footer", "pricing_benefits": [ "" ], "register_price_action": "default", "register_price": "", "thank_you_page_enabled": false, "thank_you_page_type": "message", "thank_you_message": "", "thank_you_page_id": "0", "custom_login_urls_enabled": false, "custom_login_urls_default": "", "custom_login_urls": [], "expire_type": "none", "expire_after": "1", "expire_unit": "days", "expire_fixed": "2019-04-04", "tax_exempt": false, "allow_renewal": false, "access_url": "", "disable_address_fields": false, "simultaneous_subscriptions": false, "use_custom_template": false, "custom_template": "template-sitemap.php", "customize_payment_methods": false, "custom_payment_methods": [], "customize_profile_fields": false, "custom_profile_fields": [], "cannot_purchase_message": "You don't have access to purchase this item." }, { "id": 251, "title": "25 2", "content": "", "excerpt": "", "date": "2019-03-13 16:20:43", "status": "publish", "author": { "id": 5, "email": "zapier@test.com", "username": "zapiertest", "nicename": "zapiertest", "url": "http://zapier.test.com", "message": "", "registered_at": "2018-08-30 16:42:13", "first_name": "zapier", "last_name": "test", "display_name": "zapier test" }, "date_gmt": "2019-03-13 22:20:43", "modified": "2019-03-20 13:02:42", "modified_gmt": "2019-03-20 19:02:42", "group": { "id": 252, "title": "25 group", "content": "", "excerpt": "", "date": "2019-03-13 16:21:20", "status": "publish", "author": "5", "date_gmt": "2019-03-13 22:21:20", "modified": "2019-03-13 16:21:20", "modified_gmt": "2019-03-13 22:21:20", "pricing_page_disabled": false, "disable_change_plan_popup": false, "is_upgrade_path": "1", "upgrade_path_reset_period": false, "group_theme": "minimal_gray_horizontal.css", "fallback_membership": "", "page_button_class": "", "page_button_highlighted_class": "", "page_button_disabled_class": "", "alternate_group_url": "", "use_custom_template": false, "custom_template": "template-sitemap.php" }, "price": "10000.00", "period": "1", "period_type": "months", "signup_button_text": "Sign Up", "limit_cycles": false, "limit_cycles_num": "2", "limit_cycles_action": "expire", "trial": false, "trial_days": "0", "trial_amount": "0.00", "trial_once": "1", "group_order": "1", "is_highlighted": false, "plan_code": "", "pricing_title": "25 2", "pricing_show_price": true, "pricing_display": "auto", "custom_price": "", "pricing_heading_txt": "", "pricing_footer_txt": "", "pricing_button_txt": "Sign Up", "pricing_button_position": "footer", "pricing_benefits": [ "" ], "register_price_action": "default", "register_price": "", "thank_you_page_enabled": false, "thank_you_page_type": "message", "thank_you_message": "", "thank_you_page_id": "0", "custom_login_urls_enabled": false, "custom_login_urls_default": "", "custom_login_urls": [], "expire_type": "none", "expire_after": "1", "expire_unit": "days", "expire_fixed": "2019-03-20", "tax_exempt": false, "allow_renewal": false, "access_url": "", "disable_address_fields": false, "simultaneous_subscriptions": false, "use_custom_template": false, "custom_template": "template-sitemap.php", "customize_payment_methods": false, "custom_payment_methods": [], "customize_profile_fields": false, "custom_profile_fields": [], "cannot_purchase_message": "You don't have access to purchase this item." }, { "id": 250, "title": "25 1", "content": "", "excerpt": "", "date": "2019-03-13 16:20:17", "status": "publish", "author": { "id": 5, "email": "zapier@test.com", "username": "zapiertest", "nicename": "zapiertest", "url": "http://zapier.test.com", "message": "", "registered_at": "2018-08-30 16:42:13", "first_name": "zapier", "last_name": "test", "display_name": "zapier test" }, "date_gmt": "2019-03-13 22:20:17", "modified": "2019-03-13 16:20:17", "modified_gmt": "2019-03-13 22:20:17", "group": { "id": 252, "title": "25 group", "content": "", "excerpt": "", "date": "2019-03-13 16:21:20", "status": "publish", "author": "5", "date_gmt": "2019-03-13 22:21:20", "modified": "2019-03-13 16:21:20", "modified_gmt": "2019-03-13 22:21:20", "pricing_page_disabled": false, "disable_change_plan_popup": false, "is_upgrade_path": "1", "upgrade_path_reset_period": false, "group_theme": "minimal_gray_horizontal.css", "fallback_membership": "", "page_button_class": "", "page_button_highlighted_class": "", "page_button_disabled_class": "", "alternate_group_url": "", "use_custom_template": false, "custom_template": "template-sitemap.php" }, "price": "25.00", "period": "1", "period_type": "months", "signup_button_text": "Sign Up", "limit_cycles": false, "limit_cycles_num": "2", "limit_cycles_action": "expire", "trial": false, "trial_days": "0", "trial_amount": "0.00", "trial_once": "1", "group_order": "0", "is_highlighted": false, "plan_code": "", "pricing_title": "25 1", "pricing_show_price": true, "pricing_display": "auto", "custom_price": "", "pricing_heading_txt": "", "pricing_footer_txt": "", "pricing_button_txt": "Sign Up", "pricing_button_position": "footer", "pricing_benefits": [ "" ], "register_price_action": "default", "register_price": "", "thank_you_page_enabled": false, "thank_you_page_type": "message", "thank_you_message": "", "thank_you_page_id": "0", "custom_login_urls_enabled": false, "custom_login_urls_default": "", "custom_login_urls": [], "expire_type": "none", "expire_after": "1", "expire_unit": "days", "expire_fixed": "2019-03-13", "tax_exempt": false, "allow_renewal": false, "access_url": "", "disable_address_fields": false, "simultaneous_subscriptions": false, "use_custom_template": false, "custom_template": "template-sitemap.php", "customize_payment_methods": false, "custom_payment_methods": [], "customize_profile_fields": false, "custom_profile_fields": [], "cannot_purchase_message": "You don't have access to purchase this item." }, { "id": 247, "title": "274 yearly", "content": "", "excerpt": "", "date": "2019-03-04 15:47:14", "status": "publish", "author": { "id": 5, "email": "zapier@test.com", "username": "zapiertest", "nicename": "zapiertest", "url": "http://zapier.test.com", "message": "", "registered_at": "2018-08-30 16:42:13", "first_name": "zapier", "last_name": "test", "display_name": "zapier test" }, "date_gmt": "2019-03-04 22:47:14", "modified": "2019-03-04 15:47:14", "modified_gmt": "2019-03-04 22:47:14", "group": { "id": 248, "title": "proration", "content": "", "excerpt": "", "date": "2019-03-04 15:47:52", "status": "publish", "author": "5", "date_gmt": "2019-03-04 22:47:52", "modified": "2019-03-04 15:47:52", "modified_gmt": "2019-03-04 22:47:52", "pricing_page_disabled": false, "disable_change_plan_popup": false, "is_upgrade_path": "1", "upgrade_path_reset_period": false, "group_theme": "minimal_gray_horizontal.css", "fallback_membership": "", "page_button_class": "", "page_button_highlighted_class": "", "page_button_disabled_class": "", "alternate_group_url": "", "use_custom_template": false, "custom_template": "template-sitemap.php" }, "price": "274.00", "period": "1", "period_type": "years", "signup_button_text": "Sign Up", "limit_cycles": false, "limit_cycles_num": "2", "limit_cycles_action": "expire", "trial": false, "trial_days": "0", "trial_amount": "0.00", "trial_once": "1", "group_order": "1", "is_highlighted": false, "plan_code": "", "pricing_title": "274 yearly", "pricing_show_price": true, "pricing_display": "auto", "custom_price": "", "pricing_heading_txt": "", "pricing_footer_txt": "", "pricing_button_txt": "Sign Up", "pricing_button_position": "footer", "pricing_benefits": [ "" ], "register_price_action": "default", "register_price": "", "thank_you_page_enabled": false, "thank_you_page_type": "message", "thank_you_message": "", "thank_you_page_id": "0", "custom_login_urls_enabled": false, "custom_login_urls_default": "", "custom_login_urls": [], "expire_type": "none", "expire_after": "1", "expire_unit": "days", "expire_fixed": "2019-03-04", "tax_exempt": false, "allow_renewal": false, "access_url": "", "disable_address_fields": false, "simultaneous_subscriptions": false, "use_custom_template": false, "custom_template": "template-sitemap.php", "customize_payment_methods": false, "custom_payment_methods": [], "customize_profile_fields": false, "custom_profile_fields": [], "cannot_purchase_message": "You don't have access to purchase this item." }, { "id": 246, "title": "264 one time", "content": "", "excerpt": "", "date": "2019-03-04 15:46:37", "status": "publish", "author": { "id": 5, "email": "zapier@test.com", "username": "zapiertest", "nicename": "zapiertest", "url": "http://zapier.test.com", "message": "", "registered_at": "2018-08-30 16:42:13", "first_name": "zapier", "last_name": "test", "display_name": "zapier test" }, "date_gmt": "2019-03-04 22:46:37", "modified": "2019-03-04 15:46:37", "modified_gmt": "2019-03-04 22:46:37", "group": { "id": 248, "title": "proration", "content": "", "excerpt": "", "date": "2019-03-04 15:47:52", "status": "publish", "author": "5", "date_gmt": "2019-03-04 22:47:52", "modified": "2019-03-04 15:47:52", "modified_gmt": "2019-03-04 22:47:52", "pricing_page_disabled": false, "disable_change_plan_popup": false, "is_upgrade_path": "1", "upgrade_path_reset_period": false, "group_theme": "minimal_gray_horizontal.css", "fallback_membership": "", "page_button_class": "", "page_button_highlighted_class": "", "page_button_disabled_class": "", "alternate_group_url": "", "use_custom_template": false, "custom_template": "template-sitemap.php" }, "price": "264.00", "period": "1", "period_type": "lifetime", "signup_button_text": "Sign Up", "limit_cycles": false, "limit_cycles_num": "2", "limit_cycles_action": "expire", "trial": false, "trial_days": "0", "trial_amount": "0.00", "trial_once": "1", "group_order": "0", "is_highlighted": false, "plan_code": "", "pricing_title": "264 one time", "pricing_show_price": true, "pricing_display": "auto", "custom_price": "", "pricing_heading_txt": "", "pricing_footer_txt": "", "pricing_button_txt": "Sign Up", "pricing_button_position": "footer", "pricing_benefits": [ "" ], "register_price_action": "default", "register_price": "", "thank_you_page_enabled": false, "thank_you_page_type": "message", "thank_you_message": "", "thank_you_page_id": "0", "custom_login_urls_enabled": false, "custom_login_urls_default": "", "custom_login_urls": [], "expire_type": "delay", "expire_after": "1", "expire_unit": "years", "expire_fixed": "2019-03-04", "tax_exempt": false, "allow_renewal": false, "access_url": "", "disable_address_fields": false, "simultaneous_subscriptions": false, "use_custom_template": false, "custom_template": "template-sitemap.php", "customize_payment_methods": false, "custom_payment_methods": [], "customize_profile_fields": false, "custom_profile_fields": [], "cannot_purchase_message": "You don't have access to purchase this item." }, { "id": 210, "title": "1 day trial", "content": "", "excerpt": "", "date": "2019-02-07 12:39:50", "status": "publish", "author": { "id": 5, "email": "zapier@test.com", "username": "zapiertest", "nicename": "zapiertest", "url": "http://zapier.test.com", "message": "", "registered_at": "2018-08-30 16:42:13", "first_name": "zapier", "last_name": "test", "display_name": "zapier test" }, "date_gmt": "2019-02-07 19:39:50", "modified": "2019-02-07 12:41:11", "modified_gmt": "2019-02-07 19:41:11", "group": "0", "price": "10.00", "period": "1", "period_type": "lifetime", "signup_button_text": "Sign Up", "limit_cycles": false, "limit_cycles_num": "2", "limit_cycles_action": "expire", "trial": false, "trial_days": "0", "trial_amount": "0.00", "trial_once": "1", "group_order": "0", "is_highlighted": false, "plan_code": "", "pricing_title": "Free 14 day trial", "pricing_show_price": true, "pricing_display": "auto", "custom_price": "", "pricing_heading_txt": "", "pricing_footer_txt": "", "pricing_button_txt": "Sign Up", "pricing_button_position": "footer", "pricing_benefits": [ "" ], "register_price_action": "default", "register_price": "", "thank_you_page_enabled": false, "thank_you_page_type": "message", "thank_you_message": "", "thank_you_page_id": "0", "custom_login_urls_enabled": false, "custom_login_urls_default": "", "custom_login_urls": [], "expire_type": "delay", "expire_after": "1", "expire_unit": "days", "expire_fixed": "2019-02-07", "tax_exempt": false, "allow_renewal": false, "access_url": "", "disable_address_fields": false, "simultaneous_subscriptions": false, "use_custom_template": false, "custom_template": "template-sitemap.php", "customize_payment_methods": false, "custom_payment_methods": [], "customize_profile_fields": false, "custom_profile_fields": [], "cannot_purchase_message": "You don't have access to purchase this item." }, { "id": 209, "title": "Trial period double signup", "content": "", "excerpt": "", "date": "2019-02-06 15:14:14", "status": "publish", "author": { "id": 5, "email": "zapier@test.com", "username": "zapiertest", "nicename": "zapiertest", "url": "http://zapier.test.com", "message": "", "registered_at": "2018-08-30 16:42:13", "first_name": "zapier", "last_name": "test", "display_name": "zapier test" }, "date_gmt": "2019-02-06 22:14:14", "modified": "2019-02-25 14:13:29", "modified_gmt": "2019-02-25 21:13:29", "group": "0", "price": "10.00", "period": "1", "period_type": "months", "signup_button_text": "Sign Up", "limit_cycles": false, "limit_cycles_num": "2", "limit_cycles_action": "expire", "trial": false, "trial_days": "1", "trial_amount": "0.00", "trial_once": "1", "group_order": "0", "is_highlighted": false, "plan_code": "", "pricing_title": "Trial period double signup", "pricing_show_price": true, "pricing_display": "auto", "custom_price": "", "pricing_heading_txt": "", "pricing_footer_txt": "", "pricing_button_txt": "Sign Up", "pricing_button_position": "footer", "pricing_benefits": [ "" ], "register_price_action": "default", "register_price": "", "thank_you_page_enabled": false, "thank_you_page_type": "message", "thank_you_message": "", "thank_you_page_id": "0", "custom_login_urls_enabled": false, "custom_login_urls_default": "", "custom_login_urls": [], "expire_type": "delay", "expire_after": "1", "expire_unit": "days", "expire_fixed": "2019-02-25", "tax_exempt": false, "allow_renewal": "1", "access_url": "", "disable_address_fields": false, "simultaneous_subscriptions": false, "use_custom_template": false, "custom_template": "template-sitemap.php", "customize_payment_methods": false, "custom_payment_methods": [], "customize_profile_fields": false, "custom_profile_fields": [], "cannot_purchase_message": "You don't have access to purchase this item." }, { "id": 196, "title": "coupon test", "content": "", "excerpt": "", "date": "2019-01-10 15:36:20", "status": "publish", "author": { "id": 5, "email": "zapier@test.com", "username": "zapiertest", "nicename": "zapiertest", "url": "http://zapier.test.com", "message": "", "registered_at": "2018-08-30 16:42:13", "first_name": "zapier", "last_name": "test", "display_name": "zapier test" }, "date_gmt": "2019-01-10 22:36:20", "modified": "2019-02-19 12:15:59", "modified_gmt": "2019-02-19 19:15:59", "group": "0", "price": "100.00", "period": "1", "period_type": "years", "signup_button_text": "Sign Up", "limit_cycles": false, "limit_cycles_num": "2", "limit_cycles_action": "expire", "trial": "1", "trial_days": "14", "trial_amount": "0.00", "trial_once": "1", "group_order": "0", "is_highlighted": false, "plan_code": "", "pricing_title": "coupon test", "pricing_show_price": true, "pricing_display": "auto", "custom_price": "", "pricing_heading_txt": "", "pricing_footer_txt": "", "pricing_button_txt": "Sign Up", "pricing_button_position": "footer", "pricing_benefits": [ "" ], "register_price_action": "default", "register_price": "", "thank_you_page_enabled": false, "thank_you_page_type": "message", "thank_you_message": "", "thank_you_page_id": "0", "custom_login_urls_enabled": false, "custom_login_urls_default": "", "custom_login_urls": [], "expire_type": "none", "expire_after": "1", "expire_unit": "days", "expire_fixed": "2019-02-19", "tax_exempt": false, "allow_renewal": false, "access_url": "", "disable_address_fields": false, "simultaneous_subscriptions": false, "use_custom_template": false, "custom_template": "template-sitemap.php", "customize_payment_methods": false, "custom_payment_methods": [], "customize_profile_fields": false, "custom_profile_fields": [], "cannot_purchase_message": "You don't have access to purchase this item." } ]
Get Membership
Description
Get one Membership with a given id.
Search Arguments
None
Update Arguments
None
Sample Request
$ curl "http://yourdomain.com/wp-json/mp/v1/memberships/274" \ -H "MEMBERPRESS-API-KEY: API-KEY-HERE" \
Sample Response
{ "id": 274, "title": "3 day free trial", "content": "", "excerpt": "", "date": "2019-04-10 12:05:01", "status": "publish", "author": { "id": 5, "email": "zapier@test.com", "username": "zapiertest", "nicename": "zapiertest", "url": "http://zapier.test.com", "message": "", "registered_at": "2018-08-30 16:42:13", "first_name": "zapier", "last_name": "test", "display_name": "zapier test" }, "date_gmt": "2019-04-10 18:05:01", "modified": "2019-04-10 12:05:01", "modified_gmt": "2019-04-10 18:05:01", "group": "0", "price": "25.00", "period": "1", "period_type": "months", "signup_button_text": "Sign Up", "limit_cycles": false, "limit_cycles_num": "2", "limit_cycles_action": "expire", "trial": "1", "trial_days": "3", "trial_amount": "0.00", "trial_once": "1", "group_order": "0", "is_highlighted": false, "plan_code": "", "pricing_title": "3 day free trial", "pricing_show_price": true, "pricing_display": "auto", "custom_price": "", "pricing_heading_txt": "", "pricing_footer_txt": "", "pricing_button_txt": "Sign Up", "pricing_button_position": "footer", "pricing_benefits": [ "" ], "register_price_action": "default", "register_price": "", "thank_you_page_enabled": false, "thank_you_page_type": "message", "thank_you_message": "", "thank_you_page_id": "0", "custom_login_urls_enabled": false, "custom_login_urls_default": "", "custom_login_urls": [], "expire_type": "none", "expire_after": "1", "expire_unit": "days", "expire_fixed": "2019-04-10", "tax_exempt": false, "allow_renewal": false, "access_url": "", "disable_address_fields": false, "simultaneous_subscriptions": false, "use_custom_template": false, "custom_template": "template-sitemap.php", "customize_payment_methods": false, "custom_payment_methods": [], "customize_profile_fields": false, "custom_profile_fields": [], "cannot_purchase_message": "You don't have access to purchase this item." }
Create Membership
Description
Create a Membership with the given field values.
Search Arguments
None
Update Arguments
title (Require) (string) – The title of the Membership.
price (decimal, default value: 0.00) – The base price for the Membership.
period (integer, default value: 1) – The Period for the Membership billing cycles. For one-time payments leave this set to 1. If you wanted to bill the customer once a quarter, you would set this to 3 and the period_type to months. There are some limitations depending on the period_type.
period_type (string, default value: lifetime) – The billing period type. For non-recurring payments this should always be set to “lifetime”. Other possible values are “weeks”, “months” and “years”. There are some limitations depending on the period.
signup_button_text (string, default value: Sign Up) – The text shown on the submit button shown on this Membership's registration form.
limit_cycles (bool, default value: false) – Whether or not to limit the billing cycles for recurring membership payments. If set to true, MemberPress will cancel the recurring payments after the limit_cycles_num amount has been reached.
limit_cycles_num (integer, default value: 2) – If limit_cycles is true, then this number is used to determine how many recurring billings should happen before MemberPress automatically cancels the Subscription. If set to 1, the Subscription will be cancelled immediately after the first payment has come through, however the member will maintain access until their Transaction has expired.
limit_cycles_action (string, default value: expire) – If limit_cycles is enabled, then this will determine the Member's access after their Subscription has reached its limit_cycles_num limit and has been cancelled. If set to “expire” then the Member will lose access after their last Transaction expires. If set to “lifetime”, the Member will be granted lifetime access.
trial (bool, default value: false) – Whether or not there will be a trial period on this Membership. Trial periods ONLY work on auto-recurring payments.
trial_days (integer, default value: 0) – How many days the trial period should last before the regular billing cycles begin.
trial_amount (decimal, default value: 0.00) – If a trial period is enabled, this specifies how much the user will pay for the trial period.
group (integer, default value: 0) – The ID of a MemberPress Group which this Membership should belong to. Defaults to no Group.
group_order (integer, default value: 0) – If the Membership belongs to a Group, this will determine its placement on the Group page and is also used to determine the Upgrade/Downgrade paths.
is_highlighted (bool, default value: false) – Whether or not to highlight this Membership in the Group. This adds extra CSS classes to make the Group pricing/features box stand out from the others.
pricing_title (string) – The title that shows at the top of the pricing box on a Group page.
pricing_display (string, default value: auto) – How to display the price on this Membership's pricing box on the Group page.
pricing_heading_txt (string) – A heading to show on this pricing box. Shows below price, but above features/benefits list.
pricing_footer_txt (string) – Show a message at the foot of the pricing box. Shows right above the purchase button.
pricing_button_txt (string) – The text of the purchase button.
pricing_benefits (array, default value: []) – An array of strings. Each string will show as a line-item on the pricing box on the Group page.
register_price (string) – A custom pricing string for this Membership. This is only used if register_price_action is set to “custom”.
register_price_action (string, default value: default) – Whether to use the default pricing string generated by MemberPress, a custom pricing string, or to hide the pricing string completely.
thank_you_page_enabled (bool, default value: false) – If set to true, the content on the Thank You page will be overridden with the message contained in thank_you_message value.
thank_you_message (string) – A string containing the Custom Thank You Page Message which is shown on the Thank You page anytime this Membership is purchased. thank_you_page_enabled must be set to true before this will be shown.
custom_login_urls_enabled (bool, default value: false) – If set to true, you can modify the login redirection by using the custom_login_urls_default and/or the custom_login_urls to control where a member is taken to after logging in.
custom_login_urls_default (string) – The URL the member will be redirected to by deafult when logging in if they have purchased this Membership. This overrides the global Login Redirect URL set in MemberPress -> Options.
custom_login_urls (array, default value: []) – An array of standard objects. Each object should have \$obj->url and \$obj->count. url is the URL the user should be redirected to when logging in, and count is the number of times they've logged in. So for example, if you wanted to take your user to a specific landing page on their 4th login attempt, you would set the url to the landing page, and the count to 4.
expire_type (string, default value: none) – If the Membership is a one-time payment (not auto-recurring), then you can set if/when it should expire. A value of none means it will be good for a lifetime. A value of delay means it expires at some delayed point in the future (example: 6 months). And a value of fixed means it will expire on a fixed date in the future (example December 31st 2019). Note: this does not work on recurring Memberships.
expire_after (integer, default value: 1) – If the expire_type is set to “delay”, use this to determine how many expire_unit's before the Membership expires. This should be a number (example “6”, for 6 days/months/weeks/years).
expire_unit (string, default value: days) – If the expire_type is set to “delay”, use this to set the unit for the expire_after value. For example, if expire_after was set to “6” and this was set to “months”, then the Membership would expire 6 months after the date the Member registered.
expire_fixed (string) – If the expire_type is set to “fixed”, then set this to the string of the date on which this Membership should expire. You can use any date format which PHP's strtotime() function can understand.
tax_exempt (bool, default value: false) – Should this Membership be exempt from taxes or not.
allow_renewal (bool, default value: false) – Allow Members to renew one-time payments before they have expired. Note: this only works on one-time payment Memberships which have a “delay” expire_type value.
access_url (string) – Use this to add a URL which should be used as the page the member can access the content for this Membership subscription.
simultaneous_subscriptions (bool, default value: false) – Allow Members to have multiple active Subscriptions to this Product simultaneously. Note: Do not use this if allow_renewal is set to true.
use_custom_template (bool, default value: false) – Whether or not to use a Custom Page Template for this Membership page.
custom_template (string) – The relative path to your template file.
customize_payment_methods (bool, default value: false) – Allow Payment Methods to be disabled on this Membership. A disabled payment method cannot be used by a Member at checkout.
custom_payment_methods (array, default value: []) – If customize_payment_methods is true, then this must be an array of the valid payment method ID's for this Membership. Note: If filtering valid payment methods, this MUST have at least one gateway ID.
Sample Request
$ curl -X POST "http://yourdomain.com/wp-json/mp/v1/memberships" \ -H "MEMBERPRESS-API-KEY: API-KEY-HERE" \ -d title="3 day free trial" \ -d price="25.00" \ -d period=1 \ -d period_type=months \ -d signup_button_text="Sign Up" \ -d limit_cycles_num=2 \ -d limit_cycles_action=expire \ -d trial=1 \ -d trial_days=3 \ -d trial_amount="0.00" \ -d pricing_title="3 day free trial" \ -d pricing_display=auto \ -d pricing_button_txt="Sign Up" \ -d register_price_action=default \ -d expire_type=none \ -d expire_after=1 \ -d expire_unit=days \ -d expire_fixed="2019-04-10" \ -d custom_template="template-sitemap.php"
Sample Response
{ "id": 274, "title": "3 day free trial", "content": "", "excerpt": "", "date": "2019-04-10 12:05:01", "status": "publish", "author": { "id": 5, "email": "zapier@test.com", "username": "zapiertest", "nicename": "zapiertest", "url": "http://zapier.test.com", "message": "", "registered_at": "2018-08-30 16:42:13", "first_name": "zapier", "last_name": "test", "display_name": "zapier test" }, "date_gmt": "2019-04-10 18:05:01", "modified": "2019-04-10 12:05:01", "modified_gmt": "2019-04-10 18:05:01", "group": "0", "price": "25.00", "period": "1", "period_type": "months", "signup_button_text": "Sign Up", "limit_cycles": false, "limit_cycles_num": "2", "limit_cycles_action": "expire", "trial": "1", "trial_days": "3", "trial_amount": "0.00", "trial_once": "1", "group_order": "0", "is_highlighted": false, "plan_code": "", "pricing_title": "3 day free trial", "pricing_show_price": true, "pricing_display": "auto", "custom_price": "", "pricing_heading_txt": "", "pricing_footer_txt": "", "pricing_button_txt": "Sign Up", "pricing_button_position": "footer", "pricing_benefits": [ "" ], "register_price_action": "default", "register_price": "", "thank_you_page_enabled": false, "thank_you_page_type": "message", "thank_you_message": "", "thank_you_page_id": "0", "custom_login_urls_enabled": false, "custom_login_urls_default": "", "custom_login_urls": [], "expire_type": "none", "expire_after": "1", "expire_unit": "days", "expire_fixed": "2019-04-10", "tax_exempt": false, "allow_renewal": false, "access_url": "", "disable_address_fields": false, "simultaneous_subscriptions": false, "use_custom_template": false, "custom_template": "template-sitemap.php", "customize_payment_methods": false, "custom_payment_methods": [], "customize_profile_fields": false, "custom_profile_fields": [], "cannot_purchase_message": "You don't have access to purchase this item." }
Update Membership
Description
Update a Membership with the given id and field values.
Search Arguments
None
Update Arguments
title (Require) (string) – The title of the Membership.
price (decimal, default value: 0.00) – The base price for the Membership.
period (integer, default value: 1) – The Period for the Membership billing cycles. For one-time payments leave this set to 1. If you wanted to bill the customer once a quarter, you would set this to 3 and the period_type to months. There are some limitations depending on the period_type.
period_type (string, default value: lifetime) – The billing period type. For non-recurring payments this should always be set to “lifetime”. Other possible values are “weeks”, “months” and “years”. There are some limitations depending on the period.
signup_button_text (string, default value: Sign Up) – The text shown on the submit button shown on this Membership's registration form.
limit_cycles (bool, default value: false) – Whether or not to limit the billing cycles for recurring membership payments. If set to true, MemberPress will cancel the recurring payments after the limit_cycles_num amount has been reached.
limit_cycles_num (integer, default value: 2) – If limit_cycles is true, then this number is used to determine how many recurring billings should happen before MemberPress automatically cancels the Subscription. If set to 1, the Subscription will be cancelled immediately after the first payment has come through, however the member will maintain access until their Transaction has expired.
limit_cycles_action (string, default value: expire) – If limit_cycles is enabled, then this will determine the Member's access after their Subscription has reached its limit_cycles_num limit and has been cancelled. If set to “expire” then the Member will lose access after their last Transaction expires. If set to “lifetime”, the Member will be granted lifetime access.
t
rial (bool, default value: false) – Whether or not there will be a trial period on this Membership. Trial periods ONLY work on auto-recurring payments.
trial_days (integer, default value: 0) – How many days the trial period should last before the regular billing cycles begin.
trial_amount (decimal, default value: 0.00) – If a trial period is enabled, this specifies how much the user will pay for the trial period.
group (integer, default value: 0) – The ID of a MemberPress Group which this Membership should belong to. Defaults to no Group.
group_order (integer, default value: 0) – If the Membership belongs to a Group, this will determine its placement on the Group page and is also used to determine the Upgrade/Downgrade paths.
is_highlighted (bool, default value: false) – Whether or not to highlight this Membership in the Group. This adds extra CSS classes to make the Group pricing/features box stand out from the others.
pricing_title (string) – The title that shows at the top of the pricing box on a Group page.
pricing_display (string, default value: auto) – How to display the price on this Membership's pricing box on the Group page.
pricing_heading_txt (string) – A heading to show on this pricing box. Shows below price, but above features/benefits list.
pricing_footer_txt (string) – Show a message at the foot of the pricing box. Shows right above the purchase button.
pricing_button_txt (string) – The text of the purchase button.
pricing_benefits (array, default value: []) – An array of strings. Each string will show as a line-item on the pricing box on the Group page.
register_price (string) – A custom pricing string for this Membership. This is only used if register_price_action is set to “custom”.
register_price_action (string, default value: default) – Whether to use the default pricing string generated by MemberPress, a custom pricing string, or to hide the pricing string completely.
thank_you_page_enabled (bool, default value: false) – If set to true, the content on the Thank You page will be overridden with the message contained in thank_you_message value.
thank_you_message (string) – A string containing the Custom Thank You Page Message which is shown on the Thank You page anytime this Membership is purchased. thank_you_page_enabled must be set to true before this will be shown.
custom_login_urls_enabled (bool, default value: false) – If set to true, you can modify the login redirection by using the custom_login_urls_default and/or the custom_login_urls to control where a member is taken to after logging in.
custom_login_urls_default (string) – The URL the member will be redirected to by deafult when logging in if they have purchased this Membership. This overrides the global Login Redirect URL set in MemberPress -> Options.
custom_login_urls (array, default value: []) – An array of standard objects. Each object should have \$obj->url and \$obj->count. url is the URL the user should be redirected to when logging in, and count is the number of times they've logged in. So for example, if you wanted to take your user to a specific landing page on their 4th login attempt, you would set the url to the landing page, and the count to 4.
expire_type (string, default value: none) – If the Membership is a one-time payment (not auto-recurring), then you can set if/when it should expire. A value of none means it will be good for a lifetime. A value of delay means it expires at some delayed point in the future (example: 6 months). And a value of fixed means it will expire on a fixed date in the future (example December 31st 2019). Note: this does not work on recurring Memberships.
expire_after (integer, default value: 1) – If the expire_type is set to “delay”, use this to determine how many expire_unit's before the Membership expires. This should be a number (example “6”, for 6 days/months/weeks/years).
expire_unit (string, default value: days) – If the expire_type is set to “delay”, use this to set the unit for the expire_after value. For example, if expire_after was set to “6” and this was set to “months”, then the Membership would expire 6 months after the date the Member registered.
expire_fixed (string) – If the expire_type is set to “fixed”, then set this to the string of the date on which this Membership should expire. You can use any date format which PHP's strtotime() function can understand.
tax_exempt (bool, default value: false) – Should this Membership be exempt from taxes or not.
allow_renewal (bool, default value: false) – Allow Members to renew one-time payments before they have expired. Note: this only works on one-time payment Memberships which have a “delay” expire_type value.
access_url (string) – Use this to add a URL which should be used as the page the member can access the content for this Membership subscription.
simultaneous_subscriptions (bool, default value: false) – Allow Members to have multiple active Subscriptions to this Product simultaneously. Note: Do not use this if allow_renewal is set to true.
use_custom_template (bool, default value: false) – Whether or not to use a Custom Page Template for this Membership page.
custom_template (string) – The relative path to your template file.
customize_payment_methods (bool, default value: false) – Allow Payment Methods to be disabled on this Membership. A disabled payment method cannot be used by a Member at checkout.
custom_payment_methods (array, default value: []) – If customize_payment_methods is true, then this must be an array of the valid payment method ID's for this Membership. Note: If filtering valid payment methods, this MUST have at least one gateway ID.
Sample Request
$ curl -X POST "http://yourdomain.com/wp-json/mp/v1/memberships/274" \ -H "MEMBERPRESS-API-KEY: API-KEY-HERE" \ -d title="3 day free trial" \ -d price="25.00" \ -d period=1 \ -d period_type=months \ -d signup_button_text="Sign Up" \ -d limit_cycles_num=2 \ -d limit_cycles_action=expire \ -d trial=1 \ -d trial_days=3 \ -d trial_amount="0.00" \ -d pricing_title="3 day free trial" \ -d pricing_display=auto \ -d pricing_button_txt="Sign Up" \ -d register_price_action=default \ -d expire_type=none \ -d expire_after=1 \ -d expire_unit=days \ -d expire_fixed="2019-04-10" \ -d custom_template="template-sitemap.php"
Sample Response
{ "id": 274, "title": "3 day free trial", "content": "", "excerpt": "", "date": "2019-04-10 12:05:01", "status": "publish", "author": { "id": 5, "email": "zapier@test.com", "username": "zapiertest", "nicename": "zapiertest", "url": "http://zapier.test.com", "message": "", "registered_at": "2018-08-30 16:42:13", "first_name": "zapier", "last_name": "test", "display_name": "zapier test" }, "date_gmt": "2019-04-10 18:05:01", "modified": "2019-04-10 12:05:01", "modified_gmt": "2019-04-10 18:05:01", "group": "0", "price": "25.00", "period": "1", "period_type": "months", "signup_button_text": "Sign Up", "limit_cycles": false, "limit_cycles_num": "2", "limit_cycles_action": "expire", "trial": "1", "trial_days": "3", "trial_amount": "0.00", "trial_once": "1", "group_order": "0", "is_highlighted": false, "plan_code": "", "pricing_title": "3 day free trial", "pricing_show_price": true, "pricing_display": "auto", "custom_price": "", "pricing_heading_txt": "", "pricing_footer_txt": "", "pricing_button_txt": "Sign Up", "pricing_button_position": "footer", "pricing_benefits": [ "" ], "register_price_action": "default", "register_price": "", "thank_you_page_enabled": false, "thank_you_page_type": "message", "thank_you_message": "", "thank_you_page_id": "0", "custom_login_urls_enabled": false, "custom_login_urls_default": "", "custom_login_urls": [], "expire_type": "none", "expire_after": "1", "expire_unit": "days", "expire_fixed": "2019-04-10", "tax_exempt": false, "allow_renewal": false, "access_url": "", "disable_address_fields": false, "simultaneous_subscriptions": false, "use_custom_template": false, "custom_template": "template-sitemap.php", "customize_payment_methods": false, "custom_payment_methods": [], "customize_profile_fields": false, "custom_profile_fields": [], "cannot_purchase_message": "You don't have access to purchase this item." }
Delete Membership
Description
Delete a Membership with the given id.
Search Arguments
None
Update Arguments
None
Sample Request
$ curl -X DELETE "http://yourdomain.com/wp-json/mp/v1/memberships/274" \ -H "MEMBERPRESS-API-KEY: API-KEY-HERE" \
Sample Response
{ "id": 274, "title": "3 day free trial", "content": "", "excerpt": "", "date": "2019-04-10 12:05:01", "status": "publish", "author": { "id": 5, "email": "zapier@test.com", "username": "zapiertest", "nicename": "zapiertest", "url": "http://zapier.test.com", "message": "", "registered_at": "2018-08-30 16:42:13", "first_name": "zapier", "last_name": "test", "display_name": "zapier test" }, "date_gmt": "2019-04-10 18:05:01", "modified": "2019-04-10 12:05:01", "modified_gmt": "2019-04-10 18:05:01", "group": "0", "price": "25.00", "period": "1", "period_type": "months", "signup_button_text": "Sign Up", "limit_cycles": false, "limit_cycles_num": "2", "limit_cycles_action": "expire", "trial": "1", "trial_days": "3", "trial_amount": "0.00", "trial_once": "1", "group_order": "0", "is_highlighted": false, "plan_code": "", "pricing_title": "3 day free trial", "pricing_show_price": true, "pricing_display": "auto", "custom_price": "", "pricing_heading_txt": "", "pricing_footer_txt": "", "pricing_button_txt": "Sign Up", "pricing_button_position": "footer", "pricing_benefits": [ "" ], "register_price_action": "default", "register_price": "", "thank_you_page_enabled": false, "thank_you_page_type": "message", "thank_you_message": "", "thank_you_page_id": "0", "custom_login_urls_enabled": false, "custom_login_urls_default": "", "custom_login_urls": [], "expire_type": "none", "expire_after": "1", "expire_unit": "days", "expire_fixed": "2019-04-10", "tax_exempt": false, "allow_renewal": false, "access_url": "", "disable_address_fields": false, "simultaneous_subscriptions": false, "use_custom_template": false, "custom_template": "template-sitemap.php", "customize_payment_methods": false, "custom_payment_methods": [], "customize_profile_fields": false, "custom_profile_fields": [], "cannot_purchase_message": "You don't have access to purchase this item." }
Get Coupons
Description
Get all Coupons based on the search arguments provided.
Search Arguments
page (integer, default value: 1) – Current page of the collection.
per_page (integer, default value: 10) – Maximum number of items to be returned in result set.
search (string) – Limit results to those matching a string.
code (integer) – Grab the coupon with the given code.
Update Arguments
None
Sample Request
$ curl "http://yourdomain.com/wp-json/mp/v1/coupons?page=2&per_page=10" \ -H "MEMBERPRESS-API-KEY: API-KEY-HERE" \
Sample Response
[ { "id": 275, "coupon_code": "B2XJTM2YQB", "date": "2019-04-10 12:05:53", "status": "publish", "author": { "id": 5, "email": "zapier@test.com", "username": "zapiertest", "nicename": "zapiertest", "url": "http://zapier.test.com", "message": "", "registered_at": "2018-08-30 16:42:13", "first_name": "zapier", "last_name": "test", "display_name": "zapier test" }, "date_gmt": "2019-04-10 18:05:53", "modified": "2019-04-10 12:08:13", "modified_gmt": "2019-04-10 18:08:13", "valid_memberships": [ { "id": 274, "title": "3 day free trial", "content": "", "excerpt": "", "date": "2019-04-10 12:05:01", "status": "publish", "author": "5", "date_gmt": "2019-04-10 18:05:01", "modified": "2019-04-10 12:05:01", "modified_gmt": "2019-04-10 18:05:01", "group": "0", "price": "25.00", "period": "1", "period_type": "months", "signup_button_text": "Sign Up", "limit_cycles": false, "limit_cycles_num": "2", "limit_cycles_action": "expire", "trial": "1", "trial_days": "3", "trial_amount": "0.00", "trial_once": "1", "group_order": "0", "is_highlighted": false, "plan_code": "", "pricing_title": "3 day free trial", "pricing_show_price": true, "pricing_display": "auto", "custom_price": "", "pricing_heading_txt": "", "pricing_footer_txt": "", "pricing_button_txt": "Sign Up", "pricing_button_position": "footer", "pricing_benefits": [ "" ], "register_price_action": "default", "register_price": "", "thank_you_page_enabled": false, "thank_you_page_type": "message", "thank_you_message": "", "thank_you_page_id": "0", "custom_login_urls_enabled": false, "custom_login_urls_default": "", "custom_login_urls": [], "expire_type": "none", "expire_after": "1", "expire_unit": "days", "expire_fixed": "2019-04-10", "tax_exempt": false, "allow_renewal": false, "access_url": "", "disable_address_fields": false, "simultaneous_subscriptions": false, "use_custom_template": false, "custom_template": "template-sitemap.php", "customize_payment_methods": false, "custom_payment_methods": [], "customize_profile_fields": false, "custom_profile_fields": [], "cannot_purchase_message": "You don't have access to purchase this item." } ], "should_expire": false, "expires_on": "0", "usage_count": "0", "usage_amount": "0", "discount_type": "percent", "discount_amount": "15", "discount_mode": "standard", "trial_days": "3", "trial_amount": "0.00" }, { "id": 269, "coupon_code": "EXV6U3844B", "date": "2019-04-03 11:59:20", "status": "publish", "author": { "id": 5, "email": "zapier@test.com", "username": "zapiertest", "nicename": "zapiertest", "url": "http://zapier.test.com", "message": "", "registered_at": "2018-08-30 16:42:13", "first_name": "zapier", "last_name": "test", "display_name": "zapier test" }, "date_gmt": "2019-04-03 17:59:20", "modified": "2019-04-04 10:54:39", "modified_gmt": "2019-04-04 16:54:39", "valid_memberships": [ { "id": 267, "title": "coupon testing", "content": "", "excerpt": "", "date": "2019-04-03 11:18:41", "status": "publish", "author": "5", "date_gmt": "2019-04-03 17:18:41", "modified": "2019-04-04 10:58:44", "modified_gmt": "2019-04-04 16:58:44", "group": "0", "price": "9.99", "period": "1", "period_type": "months", "signup_button_text": "Sign Up", "limit_cycles": false, "limit_cycles_num": "2", "limit_cycles_action": "expire", "trial": "1", "trial_days": "90", "trial_amount": "29.94", "trial_once": "1", "group_order": "0", "is_highlighted": false, "plan_code": "", "pricing_title": "coupon testing", "pricing_show_price": true, "pricing_display": "auto", "custom_price": "", "pricing_heading_txt": "", "pricing_footer_txt": "", "pricing_button_txt": "Sign Up", "pricing_button_position": "footer", "pricing_benefits": [ "" ], "register_price_action": "default", "register_price": "", "thank_you_page_enabled": false, "thank_you_page_type": "message", "thank_you_message": "", "thank_you_page_id": "0", "custom_login_urls_enabled": false, "custom_login_urls_default": "", "custom_login_urls": [], "expire_type": "none", "expire_after": "1", "expire_unit": "days", "expire_fixed": "2019-04-04", "tax_exempt": false, "allow_renewal": false, "access_url": "", "disable_address_fields": false, "simultaneous_subscriptions": false, "use_custom_template": false, "custom_template": "template-sitemap.php", "customize_payment_methods": false, "custom_payment_methods": [], "customize_profile_fields": false, "custom_profile_fields": [], "cannot_purchase_message": "You don't have access to purchase this item." } ], "should_expire": false, "expires_on": "0", "usage_count": "2", "usage_amount": "0", "discount_type": "percent", "discount_amount": "0", "discount_mode": "trial-override", "trial_days": "90", "trial_amount": "0.00" }, { "id": 268, "coupon_code": "3ITYMDZOI5", "date": "2019-04-03 11:19:30", "status": "publish", "author": { "id": 5, "email": "zapier@test.com", "username": "zapiertest", "nicename": "zapiertest", "url": "http://zapier.test.com", "message": "", "registered_at": "2018-08-30 16:42:13", "first_name": "zapier", "last_name": "test", "display_name": "zapier test" }, "date_gmt": "2019-04-03 17:19:30", "modified": "2019-04-03 11:53:48", "modified_gmt": "2019-04-03 17:53:48", "valid_memberships": [ { "id": 267, "title": "coupon testing", "content": "", "excerpt": "", "date": "2019-04-03 11:18:41", "status": "publish", "author": "5", "date_gmt": "2019-04-03 17:18:41", "modified": "2019-04-04 10:58:44", "modified_gmt": "2019-04-04 16:58:44", "group": "0", "price": "9.99", "period": "1", "period_type": "months", "signup_button_text": "Sign Up", "limit_cycles": false, "limit_cycles_num": "2", "limit_cycles_action": "expire", "trial": "1", "trial_days": "90", "trial_amount": "29.94", "trial_once": "1", "group_order": "0", "is_highlighted": false, "plan_code": "", "pricing_title": "coupon testing", "pricing_show_price": true, "pricing_display": "auto", "custom_price": "", "pricing_heading_txt": "", "pricing_footer_txt": "", "pricing_button_txt": "Sign Up", "pricing_button_position": "footer", "pricing_benefits": [ "" ], "register_price_action": "default", "register_price": "", "thank_you_page_enabled": false, "thank_you_page_type": "message", "thank_you_message": "", "thank_you_page_id": "0", "custom_login_urls_enabled": false, "custom_login_urls_default": "", "custom_login_urls": [], "expire_type": "none", "expire_after": "1", "expire_unit": "days", "expire_fixed": "2019-04-04", "tax_exempt": false, "allow_renewal": false, "access_url": "", "disable_address_fields": false, "simultaneous_subscriptions": false, "use_custom_template": false, "custom_template": "template-sitemap.php", "customize_payment_methods": false, "custom_payment_methods": [], "customize_profile_fields": false, "custom_profile_fields": [], "cannot_purchase_message": "You don't have access to purchase this item." } ], "should_expire": false, "expires_on": "0", "usage_count": "2", "usage_amount": "0", "discount_type": "percent", "discount_amount": "100", "discount_mode": "first-payment", "trial_days": "0", "trial_amount": "0.00" }, { "id": 253, "coupon_code": "WVJKX4WU86", "date": "2019-03-13 16:25:39", "status": "publish", "author": { "id": 5, "email": "zapier@test.com", "username": "zapiertest", "nicename": "zapiertest", "url": "http://zapier.test.com", "message": "", "registered_at": "2018-08-30 16:42:13", "first_name": "zapier", "last_name": "test", "display_name": "zapier test" }, "date_gmt": "2019-03-13 22:25:39", "modified": "2019-03-13 16:26:48", "modified_gmt": "2019-03-13 22:26:48", "valid_memberships": [ { "id": 251, "title": "25 2", "content": "", "excerpt": "", "date": "2019-03-13 16:20:43", "status": "publish", "author": "5", "date_gmt": "2019-03-13 22:20:43", "modified": "2019-03-20 13:02:42", "modified_gmt": "2019-03-20 19:02:42", "group": "252", "price": "10000.00", "period": "1", "period_type": "months", "signup_button_text": "Sign Up", "limit_cycles": false, "limit_cycles_num": "2", "limit_cycles_action": "expire", "trial": false, "trial_days": "0", "trial_amount": "0.00", "trial_once": "1", "group_order": "1", "is_highlighted": false, "plan_code": "", "pricing_title": "25 2", "pricing_show_price": true, "pricing_display": "auto", "custom_price": "", "pricing_heading_txt": "", "pricing_footer_txt": "", "pricing_button_txt": "Sign Up", "pricing_button_position": "footer", "pricing_benefits": [ "" ], "register_price_action": "default", "register_price": "", "thank_you_page_enabled": false, "thank_you_page_type": "message", "thank_you_message": "", "thank_you_page_id": "0", "custom_login_urls_enabled": false, "custom_login_urls_default": "", "custom_login_urls": [], "expire_type": "none", "expire_after": "1", "expire_unit": "days", "expire_fixed": "2019-03-20", "tax_exempt": false, "allow_renewal": false, "access_url": "", "disable_address_fields": false, "simultaneous_subscriptions": false, "use_custom_template": false, "custom_template": "template-sitemap.php", "customize_payment_methods": false, "custom_payment_methods": [], "customize_profile_fields": false, "custom_profile_fields": [], "cannot_purchase_message": "You don't have access to purchase this item." } ], "should_expire": false, "expires_on": "0", "usage_count": "0", "usage_amount": "0", "discount_type": "dollar", "discount_amount": "12.6", "discount_mode": "standard", "trial_days": "0", "trial_amount": "0.00" }, { "id": 233, "coupon_code": "FRX8L9X5UO", "date": "2019-02-20 14:36:54", "status": "publish", "author": { "id": 5, "email": "zapier@test.com", "username": "zapiertest", "nicename": "zapiertest", "url": "http://zapier.test.com", "message": "", "registered_at": "2018-08-30 16:42:13", "first_name": "zapier", "last_name": "test", "display_name": "zapier test" }, "date_gmt": "2019-02-20 21:36:54", "modified": "2019-02-20 14:38:02", "modified_gmt": "2019-02-20 21:38:02", "valid_memberships": [ { "id": 139, "title": "Fixed expire test", "content": "", "excerpt": "", "date": "2018-11-16 09:58:51", "status": "publish", "author": "5", "date_gmt": "2018-11-16 16:58:51", "modified": "2019-02-20 14:41:58", "modified_gmt": "2019-02-20 21:41:58", "group": "0", "price": "75.00", "period": "1", "period_type": "years", "signup_button_text": "Sign Up", "limit_cycles": false, "limit_cycles_num": "2", "limit_cycles_action": "expire", "trial": false, "trial_days": "0", "trial_amount": "0.00", "trial_once": "1", "group_order": "0", "is_highlighted": false, "plan_code": "", "pricing_title": "Fixed expire test", "pricing_show_price": true, "pricing_display": "auto", "custom_price": "", "pricing_heading_txt": "", "pricing_footer_txt": "", "pricing_button_txt": "Sign Up", "pricing_button_position": "footer", "pricing_benefits": [ "" ], "register_price_action": "default", "register_price": "", "thank_you_page_enabled": false, "thank_you_page_type": "message", "thank_you_message": "", "thank_you_page_id": "0", "custom_login_urls_enabled": false, "custom_login_urls_default": "", "custom_login_urls": [], "expire_type": "fixed", "expire_after": "1", "expire_unit": "days", "expire_fixed": "2019-03-31", "tax_exempt": false, "allow_renewal": "1", "access_url": "", "disable_address_fields": false, "simultaneous_subscriptions": false, "use_custom_template": false, "custom_template": "template-sitemap.php", "customize_payment_methods": false, "custom_payment_methods": [], "customize_profile_fields": false, "custom_profile_fields": [], "cannot_purchase_message": "You don't have access to purchase this item." } ], "should_expire": false, "expires_on": "0", "usage_count": "1", "usage_amount": "0", "discount_type": "percent", "discount_amount": "100", "discount_mode": "standard", "trial_days": "0", "trial_amount": "0.00" }, { "id": 197, "coupon_code": "M5TGWIKIYU", "date": "2019-01-10 15:38:04", "status": "publish", "author": { "id": 5, "email": "zapier@test.com", "username": "zapiertest", "nicename": "zapiertest", "url": "http://zapier.test.com", "message": "", "registered_at": "2018-08-30 16:42:13", "first_name": "zapier", "last_name": "test", "display_name": "zapier test" }, "date_gmt": "2019-01-10 22:38:04", "modified": "2019-02-05 10:18:06", "modified_gmt": "2019-02-05 17:18:06", "valid_memberships": [ { "id": 196, "title": "coupon test", "content": "", "excerpt": "", "date": "2019-01-10 15:36:20", "status": "publish", "author": "5", "date_gmt": "2019-01-10 22:36:20", "modified": "2019-02-19 12:15:59", "modified_gmt": "2019-02-19 19:15:59", "group": "0", "price": "100.00", "period": "1", "period_type": "years", "signup_button_text": "Sign Up", "limit_cycles": false, "limit_cycles_num": "2", "limit_cycles_action": "expire", "trial": "1", "trial_days": "14", "trial_amount": "0.00", "trial_once": "1", "group_order": "0", "is_highlighted": false, "plan_code": "", "pricing_title": "coupon test", "pricing_show_price": true, "pricing_display": "auto", "custom_price": "", "pricing_heading_txt": "", "pricing_footer_txt": "", "pricing_button_txt": "Sign Up", "pricing_button_position": "footer", "pricing_benefits": [ "" ], "register_price_action": "default", "register_price": "", "thank_you_page_enabled": false, "thank_you_page_type": "message", "thank_you_message": "", "thank_you_page_id": "0", "custom_login_urls_enabled": false, "custom_login_urls_default": "", "custom_login_urls": [], "expire_type": "none", "expire_after": "1", "expire_unit": "days", "expire_fixed": "2019-02-19", "tax_exempt": false, "allow_renewal": false, "access_url": "", "disable_address_fields": false, "simultaneous_subscriptions": false, "use_custom_template": false, "custom_template": "template-sitemap.php", "customize_payment_methods": false, "custom_payment_methods": [], "customize_profile_fields": false, "custom_profile_fields": [], "cannot_purchase_message": "You don't have access to purchase this item." } ], "should_expire": false, "expires_on": "0", "usage_count": "3", "usage_amount": "0", "discount_type": "percent", "discount_amount": "20", "discount_mode": "trial-override", "trial_days": "2", "trial_amount": "0.00" }, { "id": 195, "coupon_code": "CJM43W9Y3K", "date": "2019-01-10 13:01:37", "status": "publish", "author": { "id": 5, "email": "zapier@test.com", "username": "zapiertest", "nicename": "zapiertest", "url": "http://zapier.test.com", "message": "", "registered_at": "2018-08-30 16:42:13", "first_name": "zapier", "last_name": "test", "display_name": "zapier test" }, "date_gmt": "2019-01-10 20:01:37", "modified": "2019-02-05 14:57:22", "modified_gmt": "2019-02-05 21:57:22", "valid_memberships": [ { "id": 16, "title": "Platinum Membership", "content": "", "excerpt": "", "date": "2018-08-30 16:10:44", "status": "publish", "author": "2", "date_gmt": "2018-08-30 16:10:44", "modified": "2018-11-29 10:04:26", "modified_gmt": "2018-11-29 17:04:26", "group": "17", "price": "2600.00", "period": "1", "period_type": "lifetime", "signup_button_text": "Sign Up", "limit_cycles": false, "limit_cycles_num": "2", "limit_cycles_action": "expire", "trial": false, "trial_days": "0", "trial_amount": "0.00", "trial_once": "1", "group_order": "3", "is_highlighted": false, "plan_code": "", "pricing_title": "Platinum Membership", "pricing_show_price": true, "pricing_display": "auto", "custom_price": "", "pricing_heading_txt": "", "pricing_footer_txt": "", "pricing_button_txt": "Sign Up", "pricing_button_position": "footer", "pricing_benefits": [ "" ], "register_price_action": "default", "register_price": "", "thank_you_page_enabled": false, "thank_you_page_type": "message", "thank_you_message": "", "thank_you_page_id": "0", "custom_login_urls_enabled": false, "custom_login_urls_default": "", "custom_login_urls": [], "expire_type": "none", "expire_after": "1", "expire_unit": "days", "expire_fixed": "2018-11-29", "tax_exempt": false, "allow_renewal": false, "access_url": "", "disable_address_fields": false, "simultaneous_subscriptions": "1", "use_custom_template": false, "custom_template": "template-sitemap.php", "customize_payment_methods": false, "custom_payment_methods": [], "customize_profile_fields": false, "custom_profile_fields": [], "cannot_purchase_message": "You don't have access to purchase this item." }, { "id": 15, "title": "Gold Membership", "content": "", "excerpt": "", "date": "2018-08-30 16:10:22", "status": "publish", "author": "2", "date_gmt": "2018-08-30 16:10:22", "modified": "2019-04-01 15:03:22", "modified_gmt": "2019-04-01 21:03:22", "group": "17", "price": "100.00", "period": "1", "period_type": "months", "signup_button_text": "Sign Up", "limit_cycles": false, "limit_cycles_num": "2", "limit_cycles_action": "expire", "trial": false, "trial_days": "0", "trial_amount": "0.00", "trial_once": "1", "group_order": "2", "is_highlighted": false, "plan_code": "", "pricing_title": "Gold Membership", "pricing_show_price": true, "pricing_display": "custom", "custom_price": "Pricing", "pricing_heading_txt": "", "pricing_footer_txt": "", "pricing_button_txt": "Sign Up", "pricing_button_position": "footer", "pricing_benefits": [ "" ], "register_price_action": "default", "register_price": "This is a test", "thank_you_page_enabled": false, "thank_you_page_type": "message", "thank_you_message": "", "thank_you_page_id": "0", "custom_login_urls_enabled": false, "custom_login_urls_default": "", "custom_login_urls": [], "expire_type": "none", "expire_after": "1", "expire_unit": "days", "expire_fixed": "2019-04-01", "tax_exempt": false, "allow_renewal": false, "access_url": "", "disable_address_fields": false, "simultaneous_subscriptions": "1", "use_custom_template": false, "custom_template": "template-sitemap.php", "customize_payment_methods": "1", "custom_payment_methods": [ "peum51-1tc" ], "customize_profile_fields": false, "custom_profile_fields": [], "cannot_purchase_message": "You don't have access to purchase this item." }, { "id": 14, "title": "Silver Membership", "content": "", "excerpt": "", "date": "2018-08-30 16:09:57", "status": "publish", "author": "2", "date_gmt": "2018-08-30 16:09:57", "modified": "2018-08-30 16:09:57", "modified_gmt": "2018-08-30 16:09:57", "group": "17", "price": "25.00", "period": "1", "period_type": "months", "signup_button_text": "Sign Up", "limit_cycles": false, "limit_cycles_num": "2", "limit_cycles_action": "expire", "trial": false, "trial_days": "0", "trial_amount": "0.00", "trial_once": "1", "group_order": "1", "is_highlighted": false, "plan_code": "", "pricing_title": "Silver Membership", "pricing_show_price": true, "pricing_display": "auto", "custom_price": "", "pricing_heading_txt": "", "pricing_footer_txt": "", "pricing_button_txt": "Sign Up", "pricing_button_position": "footer", "pricing_benefits": [ "" ], "register_price_action": "default", "register_price": "", "thank_you_page_enabled": false, "thank_you_page_type": "message", "thank_you_message": "", "thank_you_page_id": "0", "custom_login_urls_enabled": false, "custom_login_urls_default": "", "custom_login_urls": [], "expire_type": "none", "expire_after": "1", "expire_unit": "days", "expire_fixed": "2018-08-30", "tax_exempt": false, "allow_renewal": false, "access_url": "", "disable_address_fields": false, "simultaneous_subscriptions": false, "use_custom_template": false, "custom_template": "template-sitemap.php", "customize_payment_methods": false, "custom_payment_methods": [], "customize_profile_fields": false, "custom_profile_fields": [], "cannot_purchase_message": "You don't have access to purchase this item." }, { "id": 13, "title": "Bronze Membership", "content": "", "excerpt": "", "date": "2018-08-30 16:08:50", "status": "publish", "author": "2", "date_gmt": "2018-08-30 16:08:50", "modified": "2019-01-14 13:49:13", "modified_gmt": "2019-01-14 20:49:13", "group": "17", "price": "0.00", "period": "1", "period_type": "lifetime", "signup_button_text": "Sign Up", "limit_cycles": false, "limit_cycles_num": "2", "limit_cycles_action": "expire", "trial": false, "trial_days": "0", "trial_amount": "0.00", "trial_once": "1", "group_order": "0", "is_highlighted": false, "plan_code": "", "pricing_title": "Bronze Membership", "pricing_show_price": true, "pricing_display": "auto", "custom_price": "", "pricing_heading_txt": "", "pricing_footer_txt": "", "pricing_button_txt": "Sign Up", "pricing_button_position": "footer", "pricing_benefits": [ "" ], "register_price_action": "default", "register_price": "", "thank_you_page_enabled": false, "thank_you_page_type": "message", "thank_you_message": "", "thank_you_page_id": "0", "custom_login_urls_enabled": false, "custom_login_urls_default": "", "custom_login_urls": [], "expire_type": "none", "expire_after": "1", "expire_unit": "days", "expire_fixed": "2019-01-14", "tax_exempt": false, "allow_renewal": false, "access_url": "", "disable_address_fields": false, "simultaneous_subscriptions": false, "use_custom_template": false, "custom_template": "template-sitemap.php", "customize_payment_methods": false, "custom_payment_methods": [], "customize_profile_fields": false, "custom_profile_fields": [], "cannot_purchase_message": "You don't have access to purchase this item." } ], "should_expire": false, "expires_on": "0", "usage_count": "1", "usage_amount": "0", "discount_type": "percent", "discount_amount": "30", "discount_mode": "first-payment", "trial_days": "0", "trial_amount": "0.00" }, { "id": 157, "coupon_code": "QPL9MTM8CI", "date": "2018-12-04 10:45:16", "status": "publish", "author": { "id": 5, "email": "zapier@test.com", "username": "zapiertest", "nicename": "zapiertest", "url": "http://zapier.test.com", "message": "", "registered_at": "2018-08-30 16:42:13", "first_name": "zapier", "last_name": "test", "display_name": "zapier test" }, "date_gmt": "2018-12-04 17:45:16", "modified": "2019-03-04 11:49:36", "modified_gmt": "2019-03-04 18:49:36", "valid_memberships": [ { "id": 151, "title": "Update plan test", "content": "", "excerpt": "", "date": "2018-11-29 12:00:53", "status": "publish", "author": "5", "date_gmt": "2018-11-29 19:00:53", "modified": "2018-11-29 12:00:53", "modified_gmt": "2018-11-29 19:00:53", "group": "0", "price": "10.00", "period": "1", "period_type": "months", "signup_button_text": "Sign Up", "limit_cycles": "1", "limit_cycles_num": "1", "limit_cycles_action": "expire", "trial": "1", "trial_days": "30", "trial_amount": "10.00", "trial_once": "1", "group_order": "5", "is_highlighted": false, "plan_code": "", "pricing_title": "Update plan test", "pricing_show_price": true, "pricing_display": "auto", "custom_price": "", "pricing_heading_txt": "", "pricing_footer_txt": "", "pricing_button_txt": "Sign Up", "pricing_button_position": "footer", "pricing_benefits": [ "" ], "register_price_action": "default", "register_price": "", "thank_you_page_enabled": false, "thank_you_page_type": "message", "thank_you_message": "", "thank_you_page_id": "0", "custom_login_urls_enabled": false, "custom_login_urls_default": "", "custom_login_urls": [], "expire_type": "none", "expire_after": "1", "expire_unit": "days", "expire_fixed": "2018-11-29", "tax_exempt": false, "allow_renewal": false, "access_url": "", "disable_address_fields": false, "simultaneous_subscriptions": false, "use_custom_template": false, "custom_template": "template-sitemap.php", "customize_payment_methods": false, "custom_payment_methods": [], "customize_profile_fields": false, "custom_profile_fields": [], "cannot_purchase_message": "You don't have access to purchase this item." } ], "should_expire": false, "expires_on": "0", "usage_count": "2", "usage_amount": "0", "discount_type": "percent", "discount_amount": "100", "discount_mode": "first-payment", "trial_days": "0", "trial_amount": "0.00" } ]
Get Coupon
Description
Get one Coupon with a given id.
Search Arguments
None
Update Arguments
None
Sample Request
$ curl "http://yourdomain.com/wp-json/mp/v1/coupons/275" \ -H "MEMBERPRESS-API-KEY: API-KEY-HERE" \
Sample Response
{ "id": 275, "coupon_code": "B2XJTM2YQB", "date": "2019-04-10 12:05:53", "status": "publish", "author": { "id": 5, "email": "zapier@test.com", "username": "zapiertest", "nicename": "zapiertest", "url": "http://zapier.test.com", "message": "", "registered_at": "2018-08-30 16:42:13", "first_name": "zapier", "last_name": "test", "display_name": "zapier test" }, "date_gmt": "2019-04-10 18:05:53", "modified": "2019-04-10 12:08:13", "modified_gmt": "2019-04-10 18:08:13", "valid_memberships": [ { "id": 274, "title": "3 day free trial", "content": "", "excerpt": "", "date": "2019-04-10 12:05:01", "status": "publish", "author": "5", "date_gmt": "2019-04-10 18:05:01", "modified": "2019-04-10 12:05:01", "modified_gmt": "2019-04-10 18:05:01", "group": "0", "price": "25.00", "period": "1", "period_type": "months", "signup_button_text": "Sign Up", "limit_cycles": false, "limit_cycles_num": "2", "limit_cycles_action": "expire", "trial": "1", "trial_days": "3", "trial_amount": "0.00", "trial_once": "1", "group_order": "0", "is_highlighted": false, "plan_code": "", "pricing_title": "3 day free trial", "pricing_show_price": true, "pricing_display": "auto", "custom_price": "", "pricing_heading_txt": "", "pricing_footer_txt": "", "pricing_button_txt": "Sign Up", "pricing_button_position": "footer", "pricing_benefits": [ "" ], "register_price_action": "default", "register_price": "", "thank_you_page_enabled": false, "thank_you_page_type": "message", "thank_you_message": "", "thank_you_page_id": "0", "custom_login_urls_enabled": false, "custom_login_urls_default": "", "custom_login_urls": [], "expire_type": "none", "expire_after": "1", "expire_unit": "days", "expire_fixed": "2019-04-10", "tax_exempt": false, "allow_renewal": false, "access_url": "", "disable_address_fields": false, "simultaneous_subscriptions": false, "use_custom_template": false, "custom_template": "template-sitemap.php", "customize_payment_methods": false, "custom_payment_methods": [], "customize_profile_fields": false, "custom_profile_fields": [], "cannot_purchase_message": "You don't have access to purchase this item." } ], "should_expire": false, "expires_on": "0", "usage_count": "0", "usage_amount": "0", "discount_type": "percent", "discount_amount": "15", "discount_mode": "standard", "trial_days": "3", "trial_amount": "0.00" }
Create Coupon
Description
Create a Coupon with the given field values.
Search Arguments
None
Update Arguments
coupon_code (string, default value: <auto-generated code>) – This is the coupon code to be associated with the coupon. This should be a unique code with no spaces or special characters other than ‘-‘. If spaces are present the value will be accepted but MemberPress will replace them with dashes. Also, if this value is left blank, MemberPress will automatically generate a unique code for this coupon.
should_expire (bool, default value: false) – Set this to true if you want the coupon to expire sometime in the future.
expires_on (Require if ‘should_expire' is true) (timestamp, default value: null) – Set this to the unix timestamp of when you'd like the coupon to expire.
usage_amount (integer, default value: 0) – Set this to a number greater than zero if you want to limit the number of times the coupon can be used.
discount_type (enum, default value: percent) – This will alter the way MemberPress interprets the ‘discount_amount' to either be a percentage or fixed amount.
discount_amount (decimal, default value: 0.00) – The amount of the discount. Depending on what ‘discount_type' is set to, this can either be a fixed amount or a percentage.
valid_memberships (Required) (array, default value: []) – You can set an array of membership ids here that the coupon will apply to.
discount_mode (string, default value: standard) – Set the discount type. Can be set to standard, trial-override, or first-payment. If set to standard, the discount will apply to all payments for the life of the subscription. If set to first-payment, the discount will apply only to the first payment in an automatically recurring subscription — this is accomplished by overriding the trial period on the membership. If set to trial-override, it will also override the trial period on recurring membership subscriptions.
first_payment_discount_type (enum, default value: percent) – This value is ignored if the discount_mode is anything other than “first-payment”. This will alter the way MemberPress interprets the “first_payment_discount_amount” to either be a percentage or fixed amount. Only applies to recurring subscriptions.
first_payment_discount_amount (decimal, default value: 0.00) – This value is ignored if the discount_mode is anything other than “first-payment”. The amount of the discount for the first payment of a recurring subscription. Depending on what ‘discount_type' is set to, this can either be a fixed amount or a percentage.
trial_days (integer, default value: 0) – Set the number of trial days. Only used for recurring subscriptions and if discount_mode is set to trial-override.
trial_amount (decimal, default value: 0.00) – Set the amount of the trial period. Only used for recurring subscriptions and if discount_mode is set to trial-override.
Sample Request
$ curl -X POST "http://yourdomain.com/wp-json/mp/v1/coupons" \ -H "MEMBERPRESS-API-KEY: API-KEY-HERE" \ -d coupon_code="B2XJTM2YQB" \ -d discount_type=percent \ -d discount_amount=15 \ -d discount_mode=standard \ -d trial_days=3 \ -d trial_amount="0.00"
Sample Response
{ "id": 275, "coupon_code": "B2XJTM2YQB", "date": "2019-04-10 12:05:53", "status": "publish", "author": { "id": 5, "email": "zapier@test.com", "username": "zapiertest", "nicename": "zapiertest", "url": "http://zapier.test.com", "message": "", "registered_at": "2018-08-30 16:42:13", "first_name": "zapier", "last_name": "test", "display_name": "zapier test" }, "date_gmt": "2019-04-10 18:05:53", "modified": "2019-04-10 12:08:13", "modified_gmt": "2019-04-10 18:08:13", "valid_memberships": [ { "id": 274, "title": "3 day free trial", "content": "", "excerpt": "", "date": "2019-04-10 12:05:01", "status": "publish", "author": "5", "date_gmt": "2019-04-10 18:05:01", "modified": "2019-04-10 12:05:01", "modified_gmt": "2019-04-10 18:05:01", "group": "0", "price": "25.00", "period": "1", "period_type": "months", "signup_button_text": "Sign Up", "limit_cycles": false, "limit_cycles_num": "2", "limit_cycles_action": "expire", "trial": "1", "trial_days": "3", "trial_amount": "0.00", "trial_once": "1", "group_order": "0", "is_highlighted": false, "plan_code": "", "pricing_title": "3 day free trial", "pricing_show_price": true, "pricing_display": "auto", "custom_price": "", "pricing_heading_txt": "", "pricing_footer_txt": "", "pricing_button_txt": "Sign Up", "pricing_button_position": "footer", "pricing_benefits": [ "" ], "register_price_action": "default", "register_price": "", "thank_you_page_enabled": false, "thank_you_page_type": "message", "thank_you_message": "", "thank_you_page_id": "0", "custom_login_urls_enabled": false, "custom_login_urls_default": "", "custom_login_urls": [], "expire_type": "none", "expire_after": "1", "expire_unit": "days", "expire_fixed": "2019-04-10", "tax_exempt": false, "allow_renewal": false, "access_url": "", "disable_address_fields": false, "simultaneous_subscriptions": false, "use_custom_template": false, "custom_template": "template-sitemap.php", "customize_payment_methods": false, "custom_payment_methods": [], "customize_profile_fields": false, "custom_profile_fields": [], "cannot_purchase_message": "You don't have access to purchase this item." } ], "should_expire": false, "expires_on": "0", "usage_count": "0", "usage_amount": "0", "discount_type": "percent", "discount_amount": "15", "discount_mode": "standard", "trial_days": "3", "trial_amount": "0.00" }
Update Coupon
Description
Update a Coupon with the given id and field values.
Search Arguments
None
Update Arguments
coupon_code (string, default value: <auto-generated code>) – This is the coupon code to be associated with the coupon. This should be a unique code with no spaces or special characters other than ‘-‘. If spaces are present the value will be accepted but MemberPress will replace them with dashes. Also, if this value is left blank, MemberPress will automatically generate a unique code for this coupon.
should_expire (bool, default value: false) – Set this to true if you want the coupon to expire sometime in the future.
expires_on (Require if ‘should_expire' is true) (timestamp, default value: null) – Set this to the unix timestamp of when you'd like the coupon to expire.
usage_amount (integer, default value: 0) – Set this to a number greater than zero if you want to limit the number of times the coupon can be used.
discount_type (enum, default value: percent) – This will alter the way MemberPress interprets the ‘discount_amount' to either be a percentage or fixed amount.
discount_amount (decimal, default value: 0.00) – The amount of the discount. Depending on what ‘discount_type' is set to, this can either be a fixed amount or a percentage.
valid_memberships (Required) (array, default value: []) – You can set an array of membership ids here that the coupon will apply to.
discount_mode (string, default value: standard) – Set the discount type. Can be set to standard, trial-override, or first-payment. If set to standard, the discount will apply to all payments for the life of the subscription. If set to first-payment, the discount will apply only to the first payment in an automatically recurring subscription — this is accomplished by overriding the trial period on the membership. If set to trial-override, it will also override the trial period on recurring membership subscriptions.
first_payment_discount_type (enum, default value: percent) – This value is ignored if the discount_mode is anything other than “first-payment”. This will alter the way MemberPress interprets the “first_payment_discount_amount” to either be a percentage or fixed amount. Only applies to recurring subscriptions.
first_payment_discount_amount (decimal, default value: 0.00) – This value is ignored if the discount_mode is anything other than “first-payment”. The amount of the discount for the first payment of a recurring subscription. Depending on what ‘discount_type' is set to, this can either be a fixed amount or a percentage.
trial_days (integer, default value: 0) – Set the number of trial days. Only used for recurring subscriptions and if discount_mode is set to trial-override.
trial_amount (decimal, default value: 0.00) – Set the amount of the trial period. Only used for recurring subscriptions and if discount_mode is set to trial-override.
Sample Request
$ curl -X POST "http://yourdomain.com/wp-json/mp/v1/coupons/275" \ -H "MEMBERPRESS-API-KEY: API-KEY-HERE" \ -d coupon_code="B2XJTM2YQB" \ -d discount_type=percent \ -d discount_amount=15 \ -d discount_mode=standard \ -d trial_days=3 \ -d trial_amount="0.00"
Sample Response
{ "id": 275, "coupon_code": "B2XJTM2YQB", "date": "2019-04-10 12:05:53", "status": "publish", "author": { "id": 5, "email": "zapier@test.com", "username": "zapiertest", "nicename": "zapiertest", "url": "http://zapier.test.com", "message": "", "registered_at": "2018-08-30 16:42:13", "first_name": "zapier", "last_name": "test", "display_name": "zapier test" }, "date_gmt": "2019-04-10 18:05:53", "modified": "2019-04-10 12:08:13", "modified_gmt": "2019-04-10 18:08:13", "valid_memberships": [ { "id": 274, "title": "3 day free trial", "content": "", "excerpt": "", "date": "2019-04-10 12:05:01", "status": "publish", "author": "5", "date_gmt": "2019-04-10 18:05:01", "modified": "2019-04-10 12:05:01", "modified_gmt": "2019-04-10 18:05:01", "group": "0", "price": "25.00", "period": "1", "period_type": "months", "signup_button_text": "Sign Up", "limit_cycles": false, "limit_cycles_num": "2", "limit_cycles_action": "expire", "trial": "1", "trial_days": "3", "trial_amount": "0.00", "trial_once": "1", "group_order": "0", "is_highlighted": false, "plan_code": "", "pricing_title": "3 day free trial", "pricing_show_price": true, "pricing_display": "auto", "custom_price": "", "pricing_heading_txt": "", "pricing_footer_txt": "", "pricing_button_txt": "Sign Up", "pricing_button_position": "footer", "pricing_benefits": [ "" ], "register_price_action": "default", "register_price": "", "thank_you_page_enabled": false, "thank_you_page_type": "message", "thank_you_message": "", "thank_you_page_id": "0", "custom_login_urls_enabled": false, "custom_login_urls_default": "", "custom_login_urls": [], "expire_type": "none", "expire_after": "1", "expire_unit": "days", "expire_fixed": "2019-04-10", "tax_exempt": false, "allow_renewal": false, "access_url": "", "disable_address_fields": false, "simultaneous_subscriptions": false, "use_custom_template": false, "custom_template": "template-sitemap.php", "customize_payment_methods": false, "custom_payment_methods": [], "customize_profile_fields": false, "custom_profile_fields": [], "cannot_purchase_message": "You don't have access to purchase this item." } ], "should_expire": false, "expires_on": "0", "usage_count": "0", "usage_amount": "0", "discount_type": "percent", "discount_amount": "15", "discount_mode": "standard", "trial_days": "3", "trial_amount": "0.00" }
Delete Coupon
Description
Delete a Coupon with the given id.
Search Arguments
None
Update Arguments
None
Sample Request
$ curl -X DELETE "http://yourdomain.com/wp-json/mp/v1/coupons/275" \ -H "MEMBERPRESS-API-KEY: API-KEY-HERE" \
Sample Response
{ "id": 275, "coupon_code": "B2XJTM2YQB", "date": "2019-04-10 12:05:53", "status": "publish", "author": { "id": 5, "email": "zapier@test.com", "username": "zapiertest", "nicename": "zapiertest", "url": "http://zapier.test.com", "message": "", "registered_at": "2018-08-30 16:42:13", "first_name": "zapier", "last_name": "test", "display_name": "zapier test" }, "date_gmt": "2019-04-10 18:05:53", "modified": "2019-04-10 12:08:13", "modified_gmt": "2019-04-10 18:08:13", "valid_memberships": [ { "id": 274, "title": "3 day free trial", "content": "", "excerpt": "", "date": "2019-04-10 12:05:01", "status": "publish", "author": "5", "date_gmt": "2019-04-10 18:05:01", "modified": "2019-04-10 12:05:01", "modified_gmt": "2019-04-10 18:05:01", "group": "0", "price": "25.00", "period": "1", "period_type": "months", "signup_button_text": "Sign Up", "limit_cycles": false, "limit_cycles_num": "2", "limit_cycles_action": "expire", "trial": "1", "trial_days": "3", "trial_amount": "0.00", "trial_once": "1", "group_order": "0", "is_highlighted": false, "plan_code": "", "pricing_title": "3 day free trial", "pricing_show_price": true, "pricing_display": "auto", "custom_price": "", "pricing_heading_txt": "", "pricing_footer_txt": "", "pricing_button_txt": "Sign Up", "pricing_button_position": "footer", "pricing_benefits": [ "" ], "register_price_action": "default", "register_price": "", "thank_you_page_enabled": false, "thank_you_page_type": "message", "thank_you_message": "", "thank_you_page_id": "0", "custom_login_urls_enabled": false, "custom_login_urls_default": "", "custom_login_urls": [], "expire_type": "none", "expire_after": "1", "expire_unit": "days", "expire_fixed": "2019-04-10", "tax_exempt": false, "allow_renewal": false, "access_url": "", "disable_address_fields": false, "simultaneous_subscriptions": false, "use_custom_template": false, "custom_template": "template-sitemap.php", "customize_payment_methods": false, "custom_payment_methods": [], "customize_profile_fields": false, "custom_profile_fields": [], "cannot_purchase_message": "You don't have access to purchase this item." } ], "should_expire": false, "expires_on": "0", "usage_count": "0", "usage_amount": "0", "discount_type": "percent", "discount_amount": "15", "discount_mode": "standard", "trial_days": "3", "trial_amount": "0.00" }
Get Transactions
Description
Get one Transaction with a given id.
Search Arguments
page (integer, default value: 1) – Current page of the collection.
per_page (integer, default value: 10) – Maximum number of items to be returned in result set.
search (string) – Limit results to those matching a string.
member (integer) – Limit results to transactions of a specific member.
membership (integer) – Limit results to transactions for a specific membership.
coupon (integer) – Limit results to transactions created with a specific coupon.
status (string) – Limit results to transactions with a given status.
gateway (string) – Limit results to transactions created with a specific payment gateway. Should be a unique ID of the Payment method that can be found in the payments tab of the MemberPress Settings page.
subscription (integer) – Limit results to transactions associated with a specific subscription
Update Arguments
None
Sample Request
$ curl "http://yourdomain.com/wp-json/mp/v1/transactions?page=2&per_page=10" \ -H "MEMBERPRESS-API-KEY: API-KEY-HERE" \
Sample Response
[ { "membership": { "id": 15, "title": "Gold Membership", "content": "", "excerpt": "", "date": "2018-08-30 16:10:22", "status": "publish", "author": "2", "date_gmt": "2018-08-30 16:10:22", "modified": "2019-04-01 15:03:22", "modified_gmt": "2019-04-01 21:03:22", "group": "17", "price": "100.00", "period": "1", "period_type": "months", "signup_button_text": "Sign Up", "limit_cycles": false, "limit_cycles_num": "2", "limit_cycles_action": "expire", "trial": false, "trial_days": "0", "trial_amount": "0.00", "trial_once": "1", "group_order": "2", "is_highlighted": false, "plan_code": "", "pricing_title": "Gold Membership", "pricing_show_price": true, "pricing_display": "custom", "custom_price": "Pricing", "pricing_heading_txt": "", "pricing_footer_txt": "", "pricing_button_txt": "Sign Up", "pricing_button_position": "footer", "pricing_benefits": [ "" ], "register_price_action": "default", "register_price": "This is a test", "thank_you_page_enabled": false, "thank_you_page_type": "message", "thank_you_message": "", "thank_you_page_id": "0", "custom_login_urls_enabled": false, "custom_login_urls_default": "", "custom_login_urls": [], "expire_type": "none", "expire_after": "1", "expire_unit": "days", "expire_fixed": "2019-04-01", "tax_exempt": false, "allow_renewal": false, "access_url": "", "disable_address_fields": false, "simultaneous_subscriptions": "1", "use_custom_template": false, "custom_template": "template-sitemap.php", "customize_payment_methods": "1", "custom_payment_methods": [ "peum51-1tc" ], "customize_profile_fields": false, "custom_profile_fields": [], "cannot_purchase_message": "You don't have access to purchase this item." }, "member": { "id": 56, "email": "zapier@test.com", "username": "zapiertest", "nicename": "zapiertest", "url": "", "message": "", "registered_at": "2019-04-18 16:47:14", "first_name": "zapier", "last_name": "test", "display_name": "zapiertest", "address": { "mepr-address-one": "123 fake st", "mepr-address-two": "", "mepr-address-city": "city", "mepr-address-state": "UT", "mepr-address-zip": "81111", "mepr-address-country": "US" }, "profile": { "mepr_company_name": "MemberPress", "mepr_birthday": "2019-04-18", "mepr_testslug": "" } }, "coupon": "0", "subscription": { "coupon": "0", "membership": "15", "member": "56", "id": "69", "subscr_id": "cus_EuSIHGllVD3168", "gateway": "peum51-1tc", "price": "100.00", "period": "1", "period_type": "months", "limit_cycles": "0", "limit_cycles_num": "2", "limit_cycles_action": "expire", "prorated_trial": "0", "trial": "0", "trial_days": "0", "trial_amount": "0.00", "status": "active", "created_at": "2019-04-18 16:47:19", "total": "100.00", "tax_rate": "0.000", "tax_amount": "0.00", "tax_desc": "", "tax_class": "standard", "cc_last4": "1111", "cc_exp_month": "10", "cc_exp_year": "2020", "token": "", "tax_compound": "0", "tax_shipping": "1", "response": null }, "id": "199", "amount": "100.00", "total": "100.00", "tax_amount": "0.00", "tax_rate": "0.000", "tax_desc": "", "tax_class": "standard", "trans_num": "ch_1EQdOLJT1LHvX6ILZhIzeboJ", "status": "complete", "txn_type": "payment", "gateway": "peum51-1tc", "prorated": "0", "created_at": "2019-04-18 16:47:21", "expires_at": "2019-05-18 23:59:59", "corporate_account_id": "0", "parent_transaction_id": "0", "tax_compound": "0", "tax_shipping": "1", "response": null, "rebill": false, "subscription_payment_index": 1, "commissions": [] }, { "membership": { "id": 15, "title": "Gold Membership", "content": "", "excerpt": "", "date": "2018-08-30 16:10:22", "status": "publish", "author": "2", "date_gmt": "2018-08-30 16:10:22", "modified": "2019-04-01 15:03:22", "modified_gmt": "2019-04-01 21:03:22", "group": "17", "price": "100.00", "period": "1", "period_type": "months", "signup_button_text": "Sign Up", "limit_cycles": false, "limit_cycles_num": "2", "limit_cycles_action": "expire", "trial": false, "trial_days": "0", "trial_amount": "0.00", "trial_once": "1", "group_order": "2", "is_highlighted": false, "plan_code": "", "pricing_title": "Gold Membership", "pricing_show_price": true, "pricing_display": "custom", "custom_price": "Pricing", "pricing_heading_txt": "", "pricing_footer_txt": "", "pricing_button_txt": "Sign Up", "pricing_button_position": "footer", "pricing_benefits": [ "" ], "register_price_action": "default", "register_price": "This is a test", "thank_you_page_enabled": false, "thank_you_page_type": "message", "thank_you_message": "", "thank_you_page_id": "0", "custom_login_urls_enabled": false, "custom_login_urls_default": "", "custom_login_urls": [], "expire_type": "none", "expire_after": "1", "expire_unit": "days", "expire_fixed": "2019-04-01", "tax_exempt": false, "allow_renewal": false, "access_url": "", "disable_address_fields": false, "simultaneous_subscriptions": "1", "use_custom_template": false, "custom_template": "template-sitemap.php", "customize_payment_methods": "1", "custom_payment_methods": [ "peum51-1tc" ], "customize_profile_fields": false, "custom_profile_fields": [], "cannot_purchase_message": "You don't have access to purchase this item." }, "member": { "id": 56, "email": "zapier@test.com", "username": "zapiertest", "nicename": "zapiertest", "url": "", "message": "", "registered_at": "2019-04-18 16:47:14", "first_name": "zapier", "last_name": "test", "display_name": "zapiertest", "address": { "mepr-address-one": "123 fake st", "mepr-address-two": "", "mepr-address-city": "city", "mepr-address-state": "UT", "mepr-address-zip": "81111", "mepr-address-country": "US" }, "profile": { "mepr_company_name": "MemberPress", "mepr_birthday": "2019-04-18", "mepr_testslug": "" } }, "coupon": "0", "subscription": { "coupon": "0", "membership": "15", "member": "56", "id": "69", "subscr_id": "cus_EuSIHGllVD3168", "gateway": "peum51-1tc", "price": "100.00", "period": "1", "period_type": "months", "limit_cycles": "0", "limit_cycles_num": "2", "limit_cycles_action": "expire", "prorated_trial": "0", "trial": "0", "trial_days": "0", "trial_amount": "0.00", "status": "active", "created_at": "2019-04-18 16:47:19", "total": "100.00", "tax_rate": "0.000", "tax_amount": "0.00", "tax_desc": "", "tax_class": "standard", "cc_last4": "1111", "cc_exp_month": "10", "cc_exp_year": "2020", "token": "", "tax_compound": "0", "tax_shipping": "1", "response": null }, "id": "198", "amount": "0.00", "total": "0.00", "tax_amount": "0.00", "tax_rate": "0.000", "tax_desc": "", "tax_class": "standard", "trans_num": "cus_EuSIHGllVD3168", "status": "confirmed", "txn_type": "subscription_confirmation", "gateway": "peum51-1tc", "prorated": "0", "created_at": "2019-04-18 16:47:14", "expires_at": "2019-04-18 23:59:59", "corporate_account_id": "0", "parent_transaction_id": "0", "tax_compound": "0", "tax_shipping": "1", "response": null, "rebill": false, "subscription_payment_index": false }, { "membership": { "id": 271, "title": "One day membership", "content": "", "excerpt": "", "date": "2019-04-04 12:14:54", "status": "publish", "author": "5", "date_gmt": "2019-04-04 18:14:54", "modified": "2019-04-04 12:14:54", "modified_gmt": "2019-04-04 18:14:54", "group": "0", "price": "10.00", "period": "1", "period_type": "lifetime", "signup_button_text": "Sign Up", "limit_cycles": false, "limit_cycles_num": "2", "limit_cycles_action": "expire", "trial": false, "trial_days": "0", "trial_amount": "0.00", "trial_once": "1", "group_order": "0", "is_highlighted": false, "plan_code": "", "pricing_title": "One day membership", "pricing_show_price": true, "pricing_display": "auto", "custom_price": "", "pricing_heading_txt": "", "pricing_footer_txt": "", "pricing_button_txt": "Sign Up", "pricing_button_position": "footer", "pricing_benefits": [ "" ], "register_price_action": "default", "register_price": "", "thank_you_page_enabled": false, "thank_you_page_type": "message", "thank_you_message": "", "thank_you_page_id": "0", "custom_login_urls_enabled": false, "custom_login_urls_default": "", "custom_login_urls": [], "expire_type": "delay", "expire_after": "1", "expire_unit": "days", "expire_fixed": "2019-04-04", "tax_exempt": false, "allow_renewal": false, "access_url": "", "disable_address_fields": false, "simultaneous_subscriptions": false, "use_custom_template": false, "custom_template": "template-sitemap.php", "customize_payment_methods": false, "custom_payment_methods": [], "customize_profile_fields": false, "custom_profile_fields": [], "cannot_purchase_message": "You don't have access to purchase this item." }, "member": { "id": 5, "email": "zapier@test.com", "username": "zapiertest", "nicename": "zapiertest", "url": "http://zapier.test.com", "message": "", "registered_at": "2018-08-30 16:42:13", "first_name": "zapier", "last_name": "test", "display_name": "zapier test", "address": { "mepr-address-one": "120 S 200 W", "mepr-address-two": "", "mepr-address-city": "lehi", "mepr-address-state": "UT", "mepr-address-zip": "84043", "mepr-address-country": "US" }, "profile": { "mepr_company_name": "", "mepr_birthday": "2019-01-02", "mepr_testslug": "" } }, "coupon": "0", "subscription": "0", "id": "195", "amount": "10.00", "total": "10.00", "tax_amount": "0.00", "tax_rate": "0.000", "tax_desc": "", "tax_class": "standard", "trans_num": "ch_1EPstWJT1LHvX6ILpbHj3WEZ", "status": "complete", "txn_type": "payment", "gateway": "peum51-1tc", "prorated": "0", "created_at": "2019-04-16 15:08:20", "expires_at": "2019-04-17 23:59:59", "corporate_account_id": "0", "parent_transaction_id": "0", "tax_compound": "0", "tax_shipping": "1", "response": null, "rebill": false, "subscription_payment_index": false, "commissions": [] }, { "membership": { "id": 14, "title": "Silver Membership", "content": "", "excerpt": "", "date": "2018-08-30 16:09:57", "status": "publish", "author": "2", "date_gmt": "2018-08-30 16:09:57", "modified": "2018-08-30 16:09:57", "modified_gmt": "2018-08-30 16:09:57", "group": "17", "price": "25.00", "period": "1", "period_type": "months", "signup_button_text": "Sign Up", "limit_cycles": false, "limit_cycles_num": "2", "limit_cycles_action": "expire", "trial": false, "trial_days": "0", "trial_amount": "0.00", "trial_once": "1", "group_order": "1", "is_highlighted": false, "plan_code": "", "pricing_title": "Silver Membership", "pricing_show_price": true, "pricing_display": "auto", "custom_price": "", "pricing_heading_txt": "", "pricing_footer_txt": "", "pricing_button_txt": "Sign Up", "pricing_button_position": "footer", "pricing_benefits": [ "" ], "register_price_action": "default", "register_price": "", "thank_you_page_enabled": false, "thank_you_page_type": "message", "thank_you_message": "", "thank_you_page_id": "0", "custom_login_urls_enabled": false, "custom_login_urls_default": "", "custom_login_urls": [], "expire_type": "none", "expire_after": "1", "expire_unit": "days", "expire_fixed": "2018-08-30", "tax_exempt": false, "allow_renewal": false, "access_url": "", "disable_address_fields": false, "simultaneous_subscriptions": false, "use_custom_template": false, "custom_template": "template-sitemap.php", "customize_payment_methods": false, "custom_payment_methods": [], "customize_profile_fields": false, "custom_profile_fields": [], "cannot_purchase_message": "You don't have access to purchase this item." }, "member": { "id": 5, "email": "zapier@test.com", "username": "zapiertest", "nicename": "zapiertest", "url": "http://zapier.test.com", "message": "", "registered_at": "2018-08-30 16:42:13", "first_name": "zapier", "last_name": "test", "display_name": "zapier test", "address": { "mepr-address-one": "120 S 200 W", "mepr-address-two": "", "mepr-address-city": "lehi", "mepr-address-state": "UT", "mepr-address-zip": "84043", "mepr-address-country": "US" }, "profile": { "mepr_company_name": "", "mepr_birthday": "2019-01-02", "mepr_testslug": "" } }, "coupon": "0", "subscription": { "coupon": "0", "membership": "14", "member": "5", "id": "35", "subscr_id": "cus_ELEy7Swsow2wLS", "gateway": "peum51-1tc", "price": "25.00", "period": "1", "period_type": "months", "limit_cycles": "0", "limit_cycles_num": "2", "limit_cycles_action": "expire", "prorated_trial": "0", "trial": "0", "trial_days": "0", "trial_amount": "0.00", "status": "active", "created_at": "2019-01-14 16:41:05", "total": "25.00", "tax_rate": "0.000", "tax_amount": "0.00", "tax_desc": "", "tax_class": "standard", "cc_last4": "1111", "cc_exp_month": "10", "cc_exp_year": "2020", "token": "", "tax_compound": "0", "tax_shipping": "1", "response": null }, "id": "194", "amount": "25.00", "total": "25.00", "tax_amount": "0.00", "tax_rate": "0.000", "tax_desc": "", "tax_class": "standard", "trans_num": "ch_1EPCLEJT1LHvX6ILbOivd11C", "status": "complete", "txn_type": "payment", "gateway": "peum51-1tc", "prorated": "0", "created_at": "2019-04-14 17:42:12", "expires_at": "2019-05-14 23:59:59", "corporate_account_id": "0", "parent_transaction_id": "0", "tax_compound": "0", "tax_shipping": "1", "response": null, "rebill": true, "subscription_payment_index": 4, "commissions": [] }, { "membership": { "id": 167, "title": "trial cancellation test", "content": "", "excerpt": "", "date": "2018-12-14 08:17:25", "status": "publish", "author": "5", "date_gmt": "2018-12-14 15:17:25", "modified": "2018-12-14 08:17:25", "modified_gmt": "2018-12-14 15:17:25", "group": "0", "price": "20.00", "period": "1", "period_type": "months", "signup_button_text": "Sign Up", "limit_cycles": false, "limit_cycles_num": "2", "limit_cycles_action": "expire", "trial": "1", "trial_days": "30", "trial_amount": "0.00", "trial_once": "1", "group_order": "0", "is_highlighted": false, "plan_code": "", "pricing_title": "trial cancellation test", "pricing_show_price": true, "pricing_display": "auto", "custom_price": "", "pricing_heading_txt": "", "pricing_footer_txt": "", "pricing_button_txt": "Sign Up", "pricing_button_position": "footer", "pricing_benefits": [ "" ], "register_price_action": "default", "register_price": "", "thank_you_page_enabled": false, "thank_you_page_type": "message", "thank_you_message": "", "thank_you_page_id": "0", "custom_login_urls_enabled": false, "custom_login_urls_default": "", "custom_login_urls": [], "expire_type": "none", "expire_after": "1", "expire_unit": "days", "expire_fixed": "2018-12-14", "tax_exempt": false, "allow_renewal": false, "access_url": "", "disable_address_fields": false, "simultaneous_subscriptions": false, "use_custom_template": false, "custom_template": "template-sitemap.php", "customize_payment_methods": false, "custom_payment_methods": [], "customize_profile_fields": false, "custom_profile_fields": [], "cannot_purchase_message": "You don't have access to purchase this item." }, "member": { "id": 29, "email": "trial3@test.com", "username": "trial3@test.com", "nicename": "trial3test-com", "url": "", "message": "", "registered_at": "2018-12-14 15:18:45", "first_name": "trial2", "last_name": "test", "display_name": "trial3@test.com", "address": { "mepr-address-one": "123 N", "mepr-address-two": "", "mepr-address-city": "Riverton", "mepr-address-state": "UT", "mepr-address-zip": "84065", "mepr-address-country": "US" }, "profile": { "mepr_company_name": "", "mepr_birthday": "", "mepr_testslug": "" } }, "coupon": "0", "subscription": { "coupon": "0", "membership": "167", "member": "29", "id": "26", "subscr_id": "cus_E9beibZQIjrARq", "gateway": "peum51-1tc", "price": "20.00", "period": "1", "period_type": "months", "limit_cycles": "0", "limit_cycles_num": "2", "limit_cycles_action": "expire", "prorated_trial": "0", "trial": "1", "trial_days": "30", "trial_amount": "0.00", "status": "active", "created_at": "2018-12-14 15:19:04", "total": "20.00", "tax_rate": "0.000", "tax_amount": "0.00", "tax_desc": "", "tax_class": "standard", "cc_last4": "1111", "cc_exp_month": "10", "cc_exp_year": "2020", "token": "", "tax_compound": "0", "tax_shipping": "1", "response": null }, "id": "193", "amount": "20.00", "total": "20.00", "tax_amount": "0.00", "tax_rate": "0.000", "tax_desc": "", "tax_class": "standard", "trans_num": "ch_1EOodxJT1LHvX6ILTPMeYLk3", "status": "complete", "txn_type": "payment", "gateway": "peum51-1tc", "prorated": "0", "created_at": "2019-04-13 16:23:57", "expires_at": "2019-05-13 23:59:59", "corporate_account_id": "0", "parent_transaction_id": "0", "tax_compound": "0", "tax_shipping": "1", "response": null, "rebill": true, "subscription_payment_index": 4, "commissions": [] }, { "membership": { "id": 209, "title": "Trial period double signup", "content": "", "excerpt": "", "date": "2019-02-06 15:14:14", "status": "publish", "author": "5", "date_gmt": "2019-02-06 22:14:14", "modified": "2019-02-25 14:13:29", "modified_gmt": "2019-02-25 21:13:29", "group": "0", "price": "10.00", "period": "1", "period_type": "months", "signup_button_text": "Sign Up", "limit_cycles": false, "limit_cycles_num": "2", "limit_cycles_action": "expire", "trial": false, "trial_days": "1", "trial_amount": "0.00", "trial_once": "1", "group_order": "0", "is_highlighted": false, "plan_code": "", "pricing_title": "Trial period double signup", "pricing_show_price": true, "pricing_display": "auto", "custom_price": "", "pricing_heading_txt": "", "pricing_footer_txt": "", "pricing_button_txt": "Sign Up", "pricing_button_position": "footer", "pricing_benefits": [ "" ], "register_price_action": "default", "register_price": "", "thank_you_page_enabled": false, "thank_you_page_type": "message", "thank_you_message": "", "thank_you_page_id": "0", "custom_login_urls_enabled": false, "custom_login_urls_default": "", "custom_login_urls": [], "expire_type": "delay", "expire_after": "1", "expire_unit": "days", "expire_fixed": "2019-02-25", "tax_exempt": false, "allow_renewal": "1", "access_url": "", "disable_address_fields": false, "simultaneous_subscriptions": false, "use_custom_template": false, "custom_template": "template-sitemap.php", "customize_payment_methods": false, "custom_payment_methods": [], "customize_profile_fields": false, "custom_profile_fields": [], "cannot_purchase_message": "You don't have access to purchase this item." }, "member": { "id": 40, "email": "multitrial@test.com", "username": "multitrialtest", "nicename": "multitrialtest", "url": "", "message": "", "registered_at": "2019-02-06 22:16:19", "first_name": "multitrial", "last_name": "test", "display_name": "multitrialtest", "address": { "mepr-address-one": "", "mepr-address-two": "", "mepr-address-city": "", "mepr-address-state": "", "mepr-address-zip": "", "mepr-address-country": "" }, "profile": { "mepr_company_name": "", "mepr_birthday": "", "mepr_testslug": "" } }, "coupon": "0", "subscription": { "coupon": "0", "membership": "209", "member": "40", "id": "42", "subscr_id": "cus_EVj7zawVe0xj3O", "gateway": "peum51-1tc", "price": "10.00", "period": "1", "period_type": "months", "limit_cycles": "0", "limit_cycles_num": "2", "limit_cycles_action": "expire", "prorated_trial": "0", "trial": "0", "trial_days": "0", "trial_amount": "0.00", "status": "active", "created_at": "2019-02-11 16:29:32", "total": "10.00", "tax_rate": "0.000", "tax_amount": "0.00", "tax_desc": "", "tax_class": "standard", "cc_last4": "1111", "cc_exp_month": "10", "cc_exp_year": "2020", "token": "", "tax_compound": "0", "tax_shipping": "1", "response": null }, "id": "192", "amount": "10.00", "total": "10.00", "tax_amount": "0.00", "tax_rate": "0.000", "tax_desc": "", "tax_class": "standard", "trans_num": "ch_1EO6jWJT1LHvX6ILxfcxx7UR", "status": "complete", "txn_type": "payment", "gateway": "peum51-1tc", "prorated": "0", "created_at": "2019-04-11 17:30:46", "expires_at": "2019-05-11 23:59:59", "corporate_account_id": "0", "parent_transaction_id": "0", "tax_compound": "0", "tax_shipping": "1", "response": null, "rebill": true, "subscription_payment_index": 3, "commissions": [] }, { "membership": { "id": 15, "title": "Gold Membership", "content": "", "excerpt": "", "date": "2018-08-30 16:10:22", "status": "publish", "author": "2", "date_gmt": "2018-08-30 16:10:22", "modified": "2019-04-01 15:03:22", "modified_gmt": "2019-04-01 21:03:22", "group": "17", "price": "100.00", "period": "1", "period_type": "months", "signup_button_text": "Sign Up", "limit_cycles": false, "limit_cycles_num": "2", "limit_cycles_action": "expire", "trial": false, "trial_days": "0", "trial_amount": "0.00", "trial_once": "1", "group_order": "2", "is_highlighted": false, "plan_code": "", "pricing_title": "Gold Membership", "pricing_show_price": true, "pricing_display": "custom", "custom_price": "Pricing", "pricing_heading_txt": "", "pricing_footer_txt": "", "pricing_button_txt": "Sign Up", "pricing_button_position": "footer", "pricing_benefits": [ "" ], "register_price_action": "default", "register_price": "This is a test", "thank_you_page_enabled": false, "thank_you_page_type": "message", "thank_you_message": "", "thank_you_page_id": "0", "custom_login_urls_enabled": false, "custom_login_urls_default": "", "custom_login_urls": [], "expire_type": "none", "expire_after": "1", "expire_unit": "days", "expire_fixed": "2019-04-01", "tax_exempt": false, "allow_renewal": false, "access_url": "", "disable_address_fields": false, "simultaneous_subscriptions": "1", "use_custom_template": false, "custom_template": "template-sitemap.php", "customize_payment_methods": "1", "custom_payment_methods": [ "peum51-1tc" ], "customize_profile_fields": false, "custom_profile_fields": [], "cannot_purchase_message": "You don't have access to purchase this item." }, "member": { "id": 13, "email": "test6@email.com", "username": "test6@email.com", "nicename": "test6email-com", "url": "", "message": "", "registered_at": "2018-09-10 22:51:42", "first_name": "", "last_name": "", "display_name": "test6@email.com", "address": { "mepr-address-one": "", "mepr-address-two": "", "mepr-address-city": "", "mepr-address-state": "", "mepr-address-zip": "", "mepr-address-country": "" }, "profile": { "mepr_company_name": "", "mepr_birthday": "", "mepr_testslug": "" } }, "coupon": "0", "subscription": { "coupon": "0", "membership": "15", "member": "13", "id": "4", "subscr_id": "I-NTY3JJ4SEM15", "gateway": "pejdpl-1yy", "price": "100.00", "period": "1", "period_type": "months", "limit_cycles": "0", "limit_cycles_num": "2", "limit_cycles_action": "expire", "prorated_trial": "0", "trial": "0", "trial_days": "0", "trial_amount": "0.00", "status": "active", "created_at": "2018-09-10 22:53:04", "total": "100.00", "tax_rate": "0.000", "tax_amount": "0.00", "tax_desc": "", "tax_class": "standard", "cc_last4": "", "cc_exp_month": "", "cc_exp_year": "", "token": "", "tax_compound": "0", "tax_shipping": "1", "response": null }, "id": "191", "amount": "100.00", "total": "100.00", "tax_amount": "0.00", "tax_rate": "0.000", "tax_desc": "", "tax_class": "standard", "trans_num": "94773182YA5488446", "status": "complete", "txn_type": "payment", "gateway": "pejdpl-1yy", "prorated": "0", "created_at": "2019-04-10 17:41:20", "expires_at": "2019-05-10 23:59:59", "corporate_account_id": "0", "parent_transaction_id": "0", "tax_compound": "0", "tax_shipping": "1", "response": null, "rebill": true, "subscription_payment_index": 8, "commissions": [] }, { "membership": "0", "member": { "id": 24, "email": "diggity@email.com", "username": "diggity@email.com", "nicename": "diggityemail-com", "url": "", "message": "", "registered_at": "2018-12-03 20:30:51", "first_name": "test", "last_name": "username", "display_name": "diggity@email.com", "address": { "mepr-address-one": "", "mepr-address-two": "", "mepr-address-city": "", "mepr-address-state": "", "mepr-address-zip": "", "mepr-address-country": "" }, "profile": { "mepr_company_name": "", "mepr_birthday": "", "mepr_testslug": "" } }, "coupon": "0", "subscription": { "coupon": "0", "membership": "0", "member": "24", "id": "21", "subscr_id": "cus_E5ZCTZ9Z5OaNks", "gateway": "peum51-1tc", "price": "10.00", "period": "1", "period_type": "months", "limit_cycles": "0", "limit_cycles_num": "2", "limit_cycles_action": "expire", "prorated_trial": "0", "trial": "0", "trial_days": "0", "trial_amount": "0.00", "status": "active", "created_at": "2018-12-03 20:31:15", "total": "10.00", "tax_rate": "0.000", "tax_amount": "0.00", "tax_desc": "", "tax_class": "standard", "cc_last4": "1111", "cc_exp_month": "10", "cc_exp_year": "2020", "token": "", "tax_compound": "0", "tax_shipping": "1", "response": null }, "id": "190", "amount": "10.00", "total": "10.00", "tax_amount": "0.00", "tax_rate": "0.000", "tax_desc": "", "tax_class": "standard", "trans_num": "ch_1EMLD1JT1LHvX6ILTpgwZu0q", "status": "complete", "txn_type": "payment", "gateway": "peum51-1tc", "prorated": "0", "created_at": "2019-04-06 20:33:55", "expires_at": "2019-05-03 23:59:59", "corporate_account_id": "0", "parent_transaction_id": "0", "tax_compound": "0", "tax_shipping": "1", "response": null, "rebill": true, "subscription_payment_index": 5, "commissions": [] }, { "membership": { "id": 92, "title": "Unlock Your Performance - Premium", "content": "", "excerpt": "", "date": "2018-09-24 14:24:43", "status": "publish", "author": "2", "date_gmt": "2018-09-24 20:24:43", "modified": "2019-04-05 15:35:29", "modified_gmt": "2019-04-05 21:35:29", "group": "93", "price": "257.00", "period": "1", "period_type": "lifetime", "signup_button_text": "Sign Up", "limit_cycles": false, "limit_cycles_num": "2", "limit_cycles_action": "expire", "trial": false, "trial_days": "0", "trial_amount": "0.00", "trial_once": "1", "group_order": "0", "is_highlighted": false, "plan_code": "", "pricing_title": "Unlock Your Performance - Premium", "pricing_show_price": true, "pricing_display": "auto", "custom_price": "", "pricing_heading_txt": "", "pricing_footer_txt": "", "pricing_button_txt": "Sign Up", "pricing_button_position": "footer", "pricing_benefits": [ "" ], "register_price_action": "default", "register_price": "", "thank_you_page_enabled": false, "thank_you_page_type": "message", "thank_you_message": "", "thank_you_page_id": "0", "custom_login_urls_enabled": false, "custom_login_urls_default": "", "custom_login_urls": [], "expire_type": "delay", "expire_after": "1", "expire_unit": "weeks", "expire_fixed": "2019-04-05", "tax_exempt": false, "allow_renewal": "1", "access_url": "", "disable_address_fields": false, "simultaneous_subscriptions": false, "use_custom_template": false, "custom_template": "template-sitemap.php", "customize_payment_methods": false, "custom_payment_methods": [], "customize_profile_fields": false, "custom_profile_fields": [], "cannot_purchase_message": "You don't have access to purchase this item." }, "member": { "id": 5, "email": "zapier@test.com", "username": "zapiertest", "nicename": "zapiertest", "url": "http://zapier.test.com", "message": "", "registered_at": "2018-08-30 16:42:13", "first_name": "zapier", "last_name": "test", "display_name": "zapier test", "address": { "mepr-address-one": "120 S 200 W", "mepr-address-two": "", "mepr-address-city": "lehi", "mepr-address-state": "UT", "mepr-address-zip": "84043", "mepr-address-country": "US" }, "profile": { "mepr_company_name": "", "mepr_birthday": "2019-01-02", "mepr_testslug": "" } }, "coupon": "0", "subscription": "0", "id": "189", "amount": "257.00", "total": "257.00", "tax_amount": "0.00", "tax_rate": "0.000", "tax_desc": "", "tax_class": "standard", "trans_num": "mp-txn-5ca7ca6a1d8a6", "status": "pending", "txn_type": "payment", "gateway": "peum51-1tc", "prorated": "0", "created_at": "2019-04-05 21:36:42", "expires_at": "2019-04-19 23:59:59", "corporate_account_id": "0", "parent_transaction_id": "0", "tax_compound": "0", "tax_shipping": "1", "response": null, "rebill": false, "subscription_payment_index": false }, { "membership": { "id": 92, "title": "Unlock Your Performance - Premium", "content": "", "excerpt": "", "date": "2018-09-24 14:24:43", "status": "publish", "author": "2", "date_gmt": "2018-09-24 20:24:43", "modified": "2019-04-05 15:35:29", "modified_gmt": "2019-04-05 21:35:29", "group": "93", "price": "257.00", "period": "1", "period_type": "lifetime", "signup_button_text": "Sign Up", "limit_cycles": false, "limit_cycles_num": "2", "limit_cycles_action": "expire", "trial": false, "trial_days": "0", "trial_amount": "0.00", "trial_once": "1", "group_order": "0", "is_highlighted": false, "plan_code": "", "pricing_title": "Unlock Your Performance - Premium", "pricing_show_price": true, "pricing_display": "auto", "custom_price": "", "pricing_heading_txt": "", "pricing_footer_txt": "", "pricing_button_txt": "Sign Up", "pricing_button_position": "footer", "pricing_benefits": [ "" ], "register_price_action": "default", "register_price": "", "thank_you_page_enabled": false, "thank_you_page_type": "message", "thank_you_message": "", "thank_you_page_id": "0", "custom_login_urls_enabled": false, "custom_login_urls_default": "", "custom_login_urls": [], "expire_type": "delay", "expire_after": "1", "expire_unit": "weeks", "expire_fixed": "2019-04-05", "tax_exempt": false, "allow_renewal": "1", "access_url": "", "disable_address_fields": false, "simultaneous_subscriptions": false, "use_custom_template": false, "custom_template": "template-sitemap.php", "customize_payment_methods": false, "custom_payment_methods": [], "customize_profile_fields": false, "custom_profile_fields": [], "cannot_purchase_message": "You don't have access to purchase this item." }, "member": { "id": 5, "email": "zapier@test.com", "username": "zapiertest", "nicename": "zapiertest", "url": "http://zapier.test.com", "message": "", "registered_at": "2018-08-30 16:42:13", "first_name": "zapier", "last_name": "test", "display_name": "zapier test", "address": { "mepr-address-one": "120 S 200 W", "mepr-address-two": "", "mepr-address-city": "lehi", "mepr-address-state": "UT", "mepr-address-zip": "84043", "mepr-address-country": "US" }, "profile": { "mepr_company_name": "", "mepr_birthday": "2019-01-02", "mepr_testslug": "" } }, "coupon": "0", "subscription": "0", "id": "188", "amount": "257.00", "total": "257.00", "tax_amount": "0.00", "tax_rate": "0.000", "tax_desc": "", "tax_class": "standard", "trans_num": "ch_1ELzhmJT1LHvX6ILPVV6mtMr", "status": "complete", "txn_type": "payment", "gateway": "peum51-1tc", "prorated": "0", "created_at": "2019-04-05 21:35:49", "expires_at": "2019-04-12 23:59:59", "corporate_account_id": "0", "parent_transaction_id": "0", "tax_compound": "0", "tax_shipping": "1", "response": null, "rebill": false, "subscription_payment_index": false, "commissions": [] } ]
Get Transaction
Description
Get one Transaction with a given id.
Search Arguments
None
Update Arguments
None
Sample Request
$ curl "http://yourdomain.com/wp-json/mp/v1/transactions/167" \ -H "MEMBERPRESS-API-KEY: API-KEY-HERE" \
Sample Response
{ "membership": { "id": 15, "title": "Gold Membership", "content": "", "excerpt": "", "date": "2018-08-30 16:10:22", "status": "publish", "author": "2", "date_gmt": "2018-08-30 16:10:22", "modified": "2019-03-14 13:10:21", "modified_gmt": "2019-03-14 19:10:21", "group": "17", "price": "100.00", "period": "1", "period_type": "months", "signup_button_text": "Sign Up", "limit_cycles": false, "limit_cycles_num": "2", "limit_cycles_action": "expire", "trial": false, "trial_days": "0", "trial_amount": "0.00", "trial_once": "1", "group_order": "2", "is_highlighted": false, "plan_code": "", "pricing_title": "Gold Membership", "pricing_show_price": true, "pricing_display": "custom", "custom_price": "Pricing", "pricing_heading_txt": "", "pricing_footer_txt": "", "pricing_button_txt": "Sign Up", "pricing_button_position": "footer", "pricing_benefits": [ "" ], "register_price_action": "default", "register_price": "This is a test", "thank_you_page_enabled": false, "thank_you_page_type": "message", "thank_you_message": "", "thank_you_page_id": "0", "custom_login_urls_enabled": false, "custom_login_urls_default": "", "custom_login_urls": [], "expire_type": "none", "expire_after": "1", "expire_unit": "days", "expire_fixed": "2019-03-14", "tax_exempt": false, "allow_renewal": false, "access_url": "", "disable_address_fields": false, "simultaneous_subscriptions": "1", "use_custom_template": false, "custom_template": "template-sitemap.php", "customize_payment_methods": "1", "custom_payment_methods": [ "peum51-1tc" ], "customize_profile_fields": false, "custom_profile_fields": [], "cannot_purchase_message": "You don't have access to purchase this item." }, "member": { "id": 46, "email": "zapier@test.com", "username": "zapier@test.com", "nicename": "zapiertest-com", "url": "", "message": "", "registered_at": "2019-03-19 16:48:20", "first_name": "Zapier", "last_name": "test", "display_name": "zapier@test.com", "address": { "mepr-address-one": "123 fake st", "mepr-address-two": "", "mepr-address-city": "city", "mepr-address-state": "UT", "mepr-address-zip": "81111", "mepr-address-country": "US" }, "profile": { "mepr_company_name": "Zapier test", "mepr_birthday": "2019-03-19", "mepr_testslug": "" } }, "coupon": "0", "subscription": { "coupon": "0", "membership": "15", "member": "46", "id": "59", "subscr_id": "cus_EjDYhKuKyRY5N2", "gateway": "peum51-1tc", "price": "100.00", "period": "1", "period_type": "months", "limit_cycles": "0", "limit_cycles_num": "2", "limit_cycles_action": "expire", "prorated_trial": "0", "trial": "0", "trial_days": "0", "trial_amount": "0.00", "status": "cancelled", "created_at": "2019-03-19 16:48:25", "total": "100.00", "tax_rate": "0.000", "tax_amount": "0.00", "tax_desc": "", "tax_class": "standard", "cc_last4": "1111", "cc_exp_month": "10", "cc_exp_year": "2030", "token": "", "tax_compound": "0", "tax_shipping": "1", "response": null }, "id": "167", "amount": "100.00", "total": "100.00", "tax_amount": "0.00", "tax_rate": "0.000", "tax_desc": "", "tax_class": "standard", "trans_num": "ch_1EFl6yJT1LHvX6IL95fhb7M4", "status": "refunded", "txn_type": "payment", "gateway": "peum51-1tc", "prorated": "0", "created_at": "2019-03-19 16:48:28", "expires_at": "2019-04-19 23:59:59", "corporate_account_id": "0", "parent_transaction_id": "0", "tax_compound": "0", "tax_shipping": "1", "response": null, "rebill": false, "subscription_payment_index": 1, "commissions": [] }
Create Transaction
Description
Create a Transaction with the given field values.
Search Arguments
None
Update Arguments
trans_num (string, default value: mp-txn-xxx…) – The unique Transaction Number.
amount (decimal, default value: 0.00) – The base price for the Transaction (not including tax)
total (decimal, default value: 0.00) – The total price for this Transaction (including tax)
tax_amount (decimal, default value: 0.00) – Use this to manually set the tax amount for this Transaction
tax_rate (decimal, default value: 0.00) – Use this to manually set the tax rate for this Transaction
tax_desc (string) – Use this to manually set the tax description for this Transaction
tax_class (string, default value: standard) – Use this to manually set the tax class for this Transaction
member (Required) (integer, default value: 0) – The Member's WordPress User ID.
membership (Required) (integer, default value: 0) – The Membership ID associated with this Transaction.
coupon (integer, default value: 0) – The Coupon ID associated with this Transaction.
status (string, default value: pending) – The status of this Transaction.
response (string) – A place where you can store Payment Gateway POST or GET responses for later reference.
gateway (string, default value: manual) – The unique ID of the Payment method that can be found in the payments tab of MemberPress Settings page.
subscription (integer, default value: 0) – The ID of the Recurring Subscription CPT associated with this Transaction.
created_at (string, default value: Current Timestamp) – The date the Transaction was created. This should be in a MySQL datetime format. All dates stored in the database should be in UTC timezone.
expires_at (string, default value: 0000-00-00 00:00:00) – The date the Transaction will expire on. This should be in a MySQL datetime format. All dates stored in the database should be in UTC timezone. Note: Leave at default to create a Transaction that last's a lifetime (aka never expires).
send_welcome_email (bool, default value: false) – When set to true this will trigger a welcome email to send to the new member. If the user has already received a welcome email, and the membership this transaction is for does not have its own welcome email configured, then no email will be sent.
send_receipt_email (bool, default value: false) – When set to true this will trigger a transaction receipt email to be sent.
Sample Request
$ curl -X POST "http://yourdomain.com/wp-json/mp/v1/transactions" \ -H "MEMBERPRESS-API-KEY: API-KEY-HERE" \ -d amount="100.00" \ -d total="100.00" \ -d tax_amount="0.00" \ -d tax_rate="0.000" \ -d tax_class=standard \ -d trans_num="ch_1EFl6yJT1LHvX6IL95fhb7M4" \ -d status=refunded \ -d gateway="peum51-1tc" \ -d created_at="2019-03-19 16:48:28" \ -d expires_at="2019-04-19 23:59:59"
Sample Response
{ "membership": { "id": 15, "title": "Gold Membership", "content": "", "excerpt": "", "date": "2018-08-30 16:10:22", "status": "publish", "author": "2", "date_gmt": "2018-08-30 16:10:22", "modified": "2019-03-14 13:10:21", "modified_gmt": "2019-03-14 19:10:21", "group": "17", "price": "100.00", "period": "1", "period_type": "months", "signup_button_text": "Sign Up", "limit_cycles": false, "limit_cycles_num": "2", "limit_cycles_action": "expire", "trial": false, "trial_days": "0", "trial_amount": "0.00", "trial_once": "1", "group_order": "2", "is_highlighted": false, "plan_code": "", "pricing_title": "Gold Membership", "pricing_show_price": true, "pricing_display": "custom", "custom_price": "Pricing", "pricing_heading_txt": "", "pricing_footer_txt": "", "pricing_button_txt": "Sign Up", "pricing_button_position": "footer", "pricing_benefits": [ "" ], "register_price_action": "default", "register_price": "This is a test", "thank_you_page_enabled": false, "thank_you_page_type": "message", "thank_you_message": "", "thank_you_page_id": "0", "custom_login_urls_enabled": false, "custom_login_urls_default": "", "custom_login_urls": [], "expire_type": "none", "expire_after": "1", "expire_unit": "days", "expire_fixed": "2019-03-14", "tax_exempt": false, "allow_renewal": false, "access_url": "", "disable_address_fields": false, "simultaneous_subscriptions": "1", "use_custom_template": false, "custom_template": "template-sitemap.php", "customize_payment_methods": "1", "custom_payment_methods": [ "peum51-1tc" ], "customize_profile_fields": false, "custom_profile_fields": [], "cannot_purchase_message": "You don't have access to purchase this item." }, "member": { "id": 46, "email": "zapier@test.com", "username": "zapier@test.com", "nicename": "zapiertest-com", "url": "", "message": "", "registered_at": "2019-03-19 16:48:20", "first_name": "Zapier", "last_name": "test", "display_name": "zapier@test.com", "address": { "mepr-address-one": "123 fake st", "mepr-address-two": "", "mepr-address-city": "city", "mepr-address-state": "UT", "mepr-address-zip": "81111", "mepr-address-country": "US" }, "profile": { "mepr_company_name": "Zapier test", "mepr_birthday": "2019-03-19", "mepr_testslug": "" } }, "coupon": "0", "subscription": { "coupon": "0", "membership": "15", "member": "46", "id": "59", "subscr_id": "cus_EjDYhKuKyRY5N2", "gateway": "peum51-1tc", "price": "100.00", "period": "1", "period_type": "months", "limit_cycles": "0", "limit_cycles_num": "2", "limit_cycles_action": "expire", "prorated_trial": "0", "trial": "0", "trial_days": "0", "trial_amount": "0.00", "status": "cancelled", "created_at": "2019-03-19 16:48:25", "total": "100.00", "tax_rate": "0.000", "tax_amount": "0.00", "tax_desc": "", "tax_class": "standard", "cc_last4": "1111", "cc_exp_month": "10", "cc_exp_year": "2030", "token": "", "tax_compound": "0", "tax_shipping": "1", "response": null }, "id": "167", "amount": "100.00", "total": "100.00", "tax_amount": "0.00", "tax_rate": "0.000", "tax_desc": "", "tax_class": "standard", "trans_num": "ch_1EFl6yJT1LHvX6IL95fhb7M4", "status": "refunded", "txn_type": "payment", "gateway": "peum51-1tc", "prorated": "0", "created_at": "2019-03-19 16:48:28", "expires_at": "2019-04-19 23:59:59", "corporate_account_id": "0", "parent_transaction_id": "0", "tax_compound": "0", "tax_shipping": "1", "response": null, "rebill": false, "subscription_payment_index": 1, "commissions": [] }
Update Transaction
Description
Update a Transaction with the given id and field values.
Search Arguments
None
Update Arguments
trans_num (string, default value: mp-txn-xxx…) – The unique Transaction Number.
amount (decimal, default value: 0.00) – The base price for the Transaction (not including tax)
total (decimal, default value: 0.00) – The total price for this Transaction (including tax)
tax_amount (decimal, default value: 0.00) – Use this to manually set the tax amount for this Transaction
tax_rate (decimal, default value: 0.00) – Use this to manually set the tax rate for this Transaction
tax_desc (string) – Use this to manually set the tax description for this Transaction
tax_class (string, default value: standard) – Use this to manually set the tax class for this Transaction
member (Required) (integer, default value: 0) – The Member's WordPress User ID.
membership (Required) (integer, default value: 0) – The Membership ID associated with this Transaction.
coupon (integer, default value: 0) – The Coupon ID associated with this Transaction.
status (string, default value: pending) – The status of this Transaction.
response (string) – A place where you can store Payment Gateway POST or GET responses for later reference.
gateway (string, default value: manual) – The unique ID of the Payment method that can be found in the payments tab of MemberPress Settings page.
subscription (integer, default value: 0) – The ID of the Recurring Subscription CPT associated with this Transaction.
created_at (string, default value: Current Timestamp) – The date the Transaction was created. This should be in a MySQL datetime format. All dates stored in the database should be in UTC timezone.
expires_at (string, default value: 0000-00-00 00:00:00) – The date the Transaction will expire on. This should be in a MySQL datetime format. All dates stored in the database should be in UTC timezone. Note: Leave at default to create a Transaction that last's a lifetime (aka never expires).
send_welcome_email (bool, default value: false) – When set to true this will trigger a welcome email to send to the new member. If the user has already received a welcome email, and the membership this transaction is for does not have its own welcome email configured, then no email will be sent.
send_receipt_email (bool, default value: false) – When set to true this will trigger a transaction receipt email to be sent.
Sample Request
$ curl -X POST "http://yourdomain.com/wp-json/mp/v1/transactions/199" \ -H "MEMBERPRESS-API-KEY: API-KEY-HERE" \ -d amount="100.00" \ -d total="100.00" \ -d tax_amount="0.00" \ -d tax_rate="0.000" \ -d tax_class=standard \ -d trans_num="ch_1EQdOLJT1LHvX6ILZhIzeboJ" \ -d status=complete \ -d gateway="peum51-1tc" \ -d created_at="2019-04-18 16:47:21" \ -d expires_at="2019-05-18 23:59:59"
Sample Response
{ "membership": { "id": 15, "title": "Gold Membership", "content": "", "excerpt": "", "date": "2018-08-30 16:10:22", "status": "publish", "author": "2", "date_gmt": "2018-08-30 16:10:22", "modified": "2019-04-01 15:03:22", "modified_gmt": "2019-04-01 21:03:22", "group": "17", "price": "100.00", "period": "1", "period_type": "months", "signup_button_text": "Sign Up", "limit_cycles": false, "limit_cycles_num": "2", "limit_cycles_action": "expire", "trial": false, "trial_days": "0", "trial_amount": "0.00", "trial_once": "1", "group_order": "2", "is_highlighted": false, "plan_code": "", "pricing_title": "Gold Membership", "pricing_show_price": true, "pricing_display": "custom", "custom_price": "Pricing", "pricing_heading_txt": "", "pricing_footer_txt": "", "pricing_button_txt": "Sign Up", "pricing_button_position": "footer", "pricing_benefits": [ "" ], "register_price_action": "default", "register_price": "This is a test", "thank_you_page_enabled": false, "thank_you_page_type": "message", "thank_you_message": "", "thank_you_page_id": "0", "custom_login_urls_enabled": false, "custom_login_urls_default": "", "custom_login_urls": [], "expire_type": "none", "expire_after": "1", "expire_unit": "days", "expire_fixed": "2019-04-01", "tax_exempt": false, "allow_renewal": false, "access_url": "", "disable_address_fields": false, "simultaneous_subscriptions": "1", "use_custom_template": false, "custom_template": "template-sitemap.php", "customize_payment_methods": "1", "custom_payment_methods": [ "peum51-1tc" ], "customize_profile_fields": false, "custom_profile_fields": [], "cannot_purchase_message": "You don't have access to purchase this item." }, "member": { "id": 56, "email": "zapier@test.com", "username": "zapiertest", "nicename": "zapiertest", "url": "", "message": "", "registered_at": "2019-04-18 16:47:14", "first_name": "zapier", "last_name": "test", "display_name": "zapiertest", "address": { "mepr-address-one": "123 fake st", "mepr-address-two": "", "mepr-address-city": "city", "mepr-address-state": "UT", "mepr-address-zip": "81111", "mepr-address-country": "US" }, "profile": { "mepr_company_name": "MemberPress", "mepr_birthday": "2019-04-18", "mepr_testslug": "" } }, "coupon": "0", "subscription": { "coupon": "0", "membership": "15", "member": "56", "id": "69", "subscr_id": "cus_EuSIHGllVD3168", "gateway": "peum51-1tc", "price": "100.00", "period": "1", "period_type": "months", "limit_cycles": "0", "limit_cycles_num": "2", "limit_cycles_action": "expire", "prorated_trial": "0", "trial": "0", "trial_days": "0", "trial_amount": "0.00", "status": "active", "created_at": "2019-04-18 16:47:19", "total": "100.00", "tax_rate": "0.000", "tax_amount": "0.00", "tax_desc": "", "tax_class": "standard", "cc_last4": "1111", "cc_exp_month": "10", "cc_exp_year": "2020", "token": "", "tax_compound": "0", "tax_shipping": "1", "response": null }, "id": "199", "amount": "100.00", "total": "100.00", "tax_amount": "0.00", "tax_rate": "0.000", "tax_desc": "", "tax_class": "standard", "trans_num": "ch_1EQdOLJT1LHvX6ILZhIzeboJ", "status": "complete", "txn_type": "payment", "gateway": "peum51-1tc", "prorated": "0", "created_at": "2019-04-18 16:47:21", "expires_at": "2019-05-18 23:59:59", "corporate_account_id": "0", "parent_transaction_id": "0", "tax_compound": "0", "tax_shipping": "1", "response": null, "rebill": false, "subscription_payment_index": 1, "commissions": [] }
Delete Transaction
Description
Delete a Transaction with the given id.
Search Arguments
None
Update Arguments
None
Sample Request
$ curl -X DELETE "http://yourdomai.com/wp-json/mp/v1/transactions/199" \ -H "MEMBERPRESS-API-KEY: API-KEY-HERE" \
Sample Response
{ "membership": { "id": 15, "title": "Gold Membership", "content": "", "excerpt": "", "date": "2018-08-30 16:10:22", "status": "publish", "author": "2", "date_gmt": "2018-08-30 16:10:22", "modified": "2019-04-01 15:03:22", "modified_gmt": "2019-04-01 21:03:22", "group": "17", "price": "100.00", "period": "1", "period_type": "months", "signup_button_text": "Sign Up", "limit_cycles": false, "limit_cycles_num": "2", "limit_cycles_action": "expire", "trial": false, "trial_days": "0", "trial_amount": "0.00", "trial_once": "1", "group_order": "2", "is_highlighted": false, "plan_code": "", "pricing_title": "Gold Membership", "pricing_show_price": true, "pricing_display": "custom", "custom_price": "Pricing", "pricing_heading_txt": "", "pricing_footer_txt": "", "pricing_button_txt": "Sign Up", "pricing_button_position": "footer", "pricing_benefits": [ "" ], "register_price_action": "default", "register_price": "This is a test", "thank_you_page_enabled": false, "thank_you_page_type": "message", "thank_you_message": "", "thank_you_page_id": "0", "custom_login_urls_enabled": false, "custom_login_urls_default": "", "custom_login_urls": [], "expire_type": "none", "expire_after": "1", "expire_unit": "days", "expire_fixed": "2019-04-01", "tax_exempt": false, "allow_renewal": false, "access_url": "", "disable_address_fields": false, "simultaneous_subscriptions": "1", "use_custom_template": false, "custom_template": "template-sitemap.php", "customize_payment_methods": "1", "custom_payment_methods": [ "peum51-1tc" ], "customize_profile_fields": false, "custom_profile_fields": [], "cannot_purchase_message": "You don't have access to purchase this item." }, "member": { "id": 56, "email": "zapier@test.com", "username": "zapiertest", "nicename": "zapiertest", "url": "", "message": "", "registered_at": "2019-04-18 16:47:14", "first_name": "zapier", "last_name": "test", "display_name": "zapiertest", "address": { "mepr-address-one": "123 fake st", "mepr-address-two": "", "mepr-address-city": "city", "mepr-address-state": "UT", "mepr-address-zip": "81111", "mepr-address-country": "US" }, "profile": { "mepr_company_name": "MemberPress", "mepr_birthday": "2019-04-18", "mepr_testslug": "" } }, "coupon": "0", "subscription": { "coupon": "0", "membership": "15", "member": "56", "id": "69", "subscr_id": "cus_EuSIHGllVD3168", "gateway": "peum51-1tc", "price": "100.00", "period": "1", "period_type": "months", "limit_cycles": "0", "limit_cycles_num": "2", "limit_cycles_action": "expire", "prorated_trial": "0", "trial": "0", "trial_days": "0", "trial_amount": "0.00", "status": "active", "created_at": "2019-04-18 16:47:19", "total": "100.00", "tax_rate": "0.000", "tax_amount": "0.00", "tax_desc": "", "tax_class": "standard", "cc_last4": "1111", "cc_exp_month": "10", "cc_exp_year": "2020", "token": "", "tax_compound": "0", "tax_shipping": "1", "response": null }, "id": "199", "amount": "100.00", "total": "100.00", "tax_amount": "0.00", "tax_rate": "0.000", "tax_desc": "", "tax_class": "standard", "trans_num": "ch_1EQdOLJT1LHvX6ILZhIzeboJ", "status": "complete", "txn_type": "payment", "gateway": "peum51-1tc", "prorated": "0", "created_at": "2019-04-18 16:47:21", "expires_at": "2019-05-18 23:59:59", "corporate_account_id": "0", "parent_transaction_id": "0", "tax_compound": "0", "tax_shipping": "1", "response": null, "rebill": false, "subscription_payment_index": 1, "commissions": [] }
Refund Transaction
Description
Refund a given transaction.
Search Arguments
None
Update Arguments
None
Sample Request
$ curl -X POST "http://yourdomain.com/wp-json/mp/v1/transactions/167/refund" \ -H "MEMBERPRESS-API-KEY: API-KEY-HERE" \
Sample Response
{ "message": "The transaction was successfully refunded.", "data": { "membership": { "id": 15, "title": "Gold Membership", "content": "", "excerpt": "", "date": "2018-08-30 16:10:22", "status": "publish", "author": "2", "date_gmt": "2018-08-30 16:10:22", "modified": "2019-03-14 13:10:21", "modified_gmt": "2019-03-14 19:10:21", "group": "17", "price": "100.00", "period": "1", "period_type": "months", "signup_button_text": "Sign Up", "limit_cycles": false, "limit_cycles_num": "2", "limit_cycles_action": "expire", "trial": false, "trial_days": "0", "trial_amount": "0.00", "trial_once": "1", "group_order": "2", "is_highlighted": false, "plan_code": "", "pricing_title": "Gold Membership", "pricing_show_price": true, "pricing_display": "custom", "custom_price": "Pricing", "pricing_heading_txt": "", "pricing_footer_txt": "", "pricing_button_txt": "Sign Up", "pricing_button_position": "footer", "pricing_benefits": [ "" ], "register_price_action": "default", "register_price": "This is a test", "thank_you_page_enabled": false, "thank_you_page_type": "message", "thank_you_message": "", "thank_you_page_id": "0", "custom_login_urls_enabled": false, "custom_login_urls_default": "", "custom_login_urls": [], "expire_type": "none", "expire_after": "1", "expire_unit": "days", "expire_fixed": "2019-03-14", "tax_exempt": false, "allow_renewal": false, "access_url": "", "disable_address_fields": false, "simultaneous_subscriptions": "1", "use_custom_template": false, "custom_template": "template-sitemap.php", "customize_payment_methods": "1", "custom_payment_methods": [ "peum51-1tc" ], "customize_profile_fields": false, "custom_profile_fields": [], "cannot_purchase_message": "You don't have access to purchase this item." }, "member": { "id": 46, "email": "zapier@test.com", "username": "zapier@test.com", "nicename": "zapiertest-com", "url": "", "message": "", "registered_at": "2019-03-19 16:48:20", "first_name": "Zapier", "last_name": "test", "display_name": "zapier@test.com", "address": { "mepr-address-one": "123 fake st", "mepr-address-two": "", "mepr-address-city": "city", "mepr-address-state": "UT", "mepr-address-zip": "81111", "mepr-address-country": "US" }, "profile": { "mepr_company_name": "Zapier test", "mepr_birthday": "2019-03-19", "mepr_testslug": "" } }, "coupon": "0", "subscription": { "coupon": "0", "membership": "15", "member": "46", "id": "59", "subscr_id": "cus_EjDYhKuKyRY5N2", "gateway": "peum51-1tc", "price": "100.00", "period": "1", "period_type": "months", "limit_cycles": "0", "limit_cycles_num": "2", "limit_cycles_action": "expire", "prorated_trial": "0", "trial": "0", "trial_days": "0", "trial_amount": "0.00", "status": "cancelled", "created_at": "2019-03-19 16:48:25", "total": "100.00", "tax_rate": "0.000", "tax_amount": "0.00", "tax_desc": "", "tax_class": "standard", "cc_last4": "1111", "cc_exp_month": "10", "cc_exp_year": "2030", "token": "", "tax_compound": "0", "tax_shipping": "1", "response": null }, "id": "167", "amount": "100.00", "total": "100.00", "tax_amount": "0.00", "tax_rate": "0.000", "tax_desc": "", "tax_class": "standard", "trans_num": "ch_1EFl6yJT1LHvX6IL95fhb7M4", "status": "refunded", "txn_type": "payment", "gateway": "peum51-1tc", "prorated": "0", "created_at": "2019-03-19 16:48:28", "expires_at": "2019-04-19 23:59:59", "corporate_account_id": "0", "parent_transaction_id": "0", "tax_compound": "0", "tax_shipping": "1", "response": null, "rebill": false, "subscription_payment_index": 1, "commissions": [] } }
Refund & Cancel Transaction
Description
Refund a given transaction and cancel its associated subscription.
Search Arguments
None
Update Arguments
None
Sample Request
$ curl -X POST "http://yourdomain.com/wp-json/mp/v1/transactions/199/refund_and_cancel" \ -H "MEMBERPRESS-API-KEY: API-KEY-HERE" \
Sample Response
{ "message": "The transaction was successfully refunded and it's associated subscription was cancelled.", "data": { "membership": { "id": 15, "title": "Gold Membership", "content": "", "excerpt": "", "date": "2018-08-30 16:10:22", "status": "publish", "author": "2", "date_gmt": "2018-08-30 16:10:22", "modified": "2019-04-01 15:03:22", "modified_gmt": "2019-04-01 21:03:22", "group": "17", "price": "100.00", "period": "1", "period_type": "months", "signup_button_text": "Sign Up", "limit_cycles": false, "limit_cycles_num": "2", "limit_cycles_action": "expire", "trial": false, "trial_days": "0", "trial_amount": "0.00", "trial_once": "1", "group_order": "2", "is_highlighted": false, "plan_code": "", "pricing_title": "Gold Membership", "pricing_show_price": true, "pricing_display": "custom", "custom_price": "Pricing", "pricing_heading_txt": "", "pricing_footer_txt": "", "pricing_button_txt": "Sign Up", "pricing_button_position": "footer", "pricing_benefits": [ "" ], "register_price_action": "default", "register_price": "This is a test", "thank_you_page_enabled": false, "thank_you_page_type": "message", "thank_you_message": "", "thank_you_page_id": "0", "custom_login_urls_enabled": false, "custom_login_urls_default": "", "custom_login_urls": [], "expire_type": "none", "expire_after": "1", "expire_unit": "days", "expire_fixed": "2019-04-01", "tax_exempt": false, "allow_renewal": false, "access_url": "", "disable_address_fields": false, "simultaneous_subscriptions": "1", "use_custom_template": false, "custom_template": "template-sitemap.php", "customize_payment_methods": "1", "custom_payment_methods": [ "peum51-1tc" ], "customize_profile_fields": false, "custom_profile_fields": [], "cannot_purchase_message": "You don't have access to purchase this item." }, "member": { "id": 56, "email": "zapier@test.com", "username": "zapiertest", "nicename": "zapiertest", "url": "", "message": "", "registered_at": "2019-04-18 16:47:14", "first_name": "zapier", "last_name": "test", "display_name": "zapiertest", "address": { "mepr-address-one": "123 fake st", "mepr-address-two": "", "mepr-address-city": "city", "mepr-address-state": "UT", "mepr-address-zip": "81111", "mepr-address-country": "US" }, "profile": { "mepr_company_name": "MemberPress", "mepr_birthday": "2019-04-18", "mepr_testslug": "" } }, "coupon": "0", "subscription": { "coupon": "0", "membership": "15", "member": "56", "id": "69", "subscr_id": "cus_EuSIHGllVD3168", "gateway": "peum51-1tc", "price": "100.00", "period": "1", "period_type": "months", "limit_cycles": "0", "limit_cycles_num": "2", "limit_cycles_action": "expire", "prorated_trial": "0", "trial": "0", "trial_days": "0", "trial_amount": "0.00", "status": "active", "created_at": "2019-04-18 16:47:19", "total": "100.00", "tax_rate": "0.000", "tax_amount": "0.00", "tax_desc": "", "tax_class": "standard", "cc_last4": "1111", "cc_exp_month": "10", "cc_exp_year": "2020", "token": "", "tax_compound": "0", "tax_shipping": "1", "response": null }, "id": "199", "amount": "100.00", "total": "100.00", "tax_amount": "0.00", "tax_rate": "0.000", "tax_desc": "", "tax_class": "standard", "trans_num": "ch_1EQdOLJT1LHvX6ILZhIzeboJ", "status": "complete", "txn_type": "payment", "gateway": "peum51-1tc", "prorated": "0", "created_at": "2019-04-18 16:47:21", "expires_at": "2019-05-18 23:59:59", "corporate_account_id": "0", "parent_transaction_id": "0", "tax_compound": "0", "tax_shipping": "1", "response": null, "rebill": false, "subscription_payment_index": 1, "commissions": [] } }