API Services Settings

API Services

API Services will available if you activate API Services module from Add-ons page.

ARMember - API Services

After activating this module, you will able to use API to get membership plans, membership plan details, member details, member’s purchase plan/post, member’s plan/post payment transactions, check coupon code, add transaction, cancel member’s plan, and check members plan.

API Services Settings

You can check API services and details from ARMember -> General Settings -> API Services Settings page.

Security Key

API security key is useful to secure the API Services and API will be return the data successfully only if the correct “Security Key” is used for the API Calls. Security key is required parameter for all API call.

ARMember General Settings ( API Service )

Get Membership Plans List

This API get all membership plans. Return JSON array with if success then status 1 and response with all plans id, name, and description.

API Service Membership Plan List

Get Membership Plan Details

Get membership plan details with a given plan id, plan id is required. Return JSON array with if success then status 1 and response plan details plan id, plan name, subscription type, plan amount, trial, etc.

Field Name Parameters
Plan ID arm_plan_id (Required)

API Service Membership Plan Details

Get Member Details

Get member details with a given user id and for get custom field value pass fields metakeys parameter arm_metakeys, user id is required parameter and fields metakeys is optional parameter and multiple Metakeys with comma separated. Return JSON array with if success then status 1 and response member details username, email, display name, first name, last name, status, and registretion date.

Field Name Parameters
Member ID arm_user_id (Required)
Field Metakeys arm_metakeys (Optional)

API Service Member's detail

Get Member’s Membership Plans

Get member’s purchased membership plans and details with a given user id. User id is required parameter, Per Page record is default 5 and optional, and page number is default 1 and optional. Return JSON array with response member’s plans detail plan id, plan name, start date, renew date, end date, and etc.

Field Name Parameters
Member ID arm_user_id (Required)
Per Page arm_perpage (Optional) (Default: 5)
Page Number arm_page (Optional) (Default: 1)

API Service Member's Membership Plans

Get Member’s Paid Posts

Get member’s purachased pay per posts and details with a given user id. User id is required parameter, Per Page record is default 5 and optional, and page number is default 1 and optional. Return JSON array with response member’s paid posts details post name, start date, renew date, end date, and etc.

Field Name Parameters
Member ID arm_user_id (Required)
Per Page arm_perpage (Optional) (Default: 5)
Page Number arm_page (Optional) (Default: 1)

API Service Member's Paid Posts

Get Member’s Plan Payment Transactions

Get member’s purchased plan payment transaction details with a given user id. User id is required parameter, Per Page record is default 5 and optional, and page number is default 1 and optional. Return JSON array with response member’s transactions detail log id, transaction id, plan name, payment gateway name, payment type, status, plan amount, paid amount, tax, discount, and etc.

Field Name Parameters
Member ID arm_user_id (Required)
Per Page arm_perpage (Optional) (Default: 5)
Page Number arm_page (Optional) (Default: 1)

API Service Member's Plan Payment Transactions

Get Member’s Paid Post Payment Transactions

Get member’s purchased pay per post payment transaction details with a given user id. User id is required parameter, Per Page record is default 5 and optional, and page number is default 1 and optional. Return JSON array with response member’s transactions detail log id, transaction id, plan name, payment gateway name, payment type, status, plan amount, paid amount, tax, discount, and etc.

Field Name Parameters
Member ID arm_user_id (Required)
Per Page arm_perpage (Optional) (Default: 5)
Page Number arm_page (Optional) (Default: 1)

API Service Member's Paid Post Payment Transactions

Verify/Check Coupon Code

Check the coupon code is available for plan and discount amount of plan. Return JSON array with response discount amount, total plan amount after discount, type of discount, discount, and coupon apply for each subscriptions.

Field Name Parameters
Coupon Code coupon_code (Required)
Plan ID plan_id (Required)
Payment Gateway gateway (Optional)

API Service Check Coupon Code

Assign/Add Plan to Member

Add plan to member with given user id and plan id. User id is require parameter, and plan id is require parameter. Return 1 if successfully add plan to member.

Field Name Parameters
Member ID arm_user_id (Required)
Plan ID arm_plan_id (Required)

API Service Add Plan to Member

Add Payment Transaction

Add membership plan and pay par post purchase transaction with given user id. User id is require parameter, plan id is require parameter, and other parameter as per below. Status parameter default is pending or allows status success, canceled, and failed. Amount paramter pass value without tax amount. Total parameter pass value with tax amount.

Field Name Parameters
Member ID arm_user_id (Required)
Plan ID plan_id (Required)
Transaction ID arm_trans_id (Optional)
Payment Gateway gateway (Optional) (Default: manual)
Status arm_status (Optional) (Default: pending)
Amount arm_amount (Optional) (Default: 0)
Total arm_total (Optional) (Default: 0)
Tax Amount arm_tax_amount (Optional) (Default: 0)
Coupon Code coupon_code (Optional)
Paid Post Payment is_post_payment (Optional) (Default: 0)
Paid Post ID is_post_id (Optional) (Default: 0)

API Service Add Transaction

Cancel Member’s Membership plan

Cancel membership plan for member with given user id and plan id. User id is require parameter, and plan_id is require parameter. Return 1 if successfully cancel plan to member.

Field Name Parameters
Member ID arm_user_id (Required)
Plan ID arm_plan_id (Required)

API Service Cancel Member's plan

Check Member’s Membership

Check member’s membership plan is Active/Suspend with given user id and plan id. User id is require parameter, and plan id is require parameter. Return status 1 if there was plan found with member id and response is_plan is 1 and if suspended then is_suspended is 1.

Field Name Parameters
Member ID arm_user_id (Required)
Plan ID arm_plan_id (Required)

API Service Check Member's Membership