API Services
API Services will available if you activate API Services module from Add-ons page.
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.
Get Membership Plans List
This API get all membership plans and returns JSON array, and if the parameter is successful it responds with status “1” along with all plans id, name, and description.
Get Membership Plan Details
To get the membership plan details, enter the valid Plan ID which will then return the JSON array, and if the parameter is successful it responds with status “1” along with all plans id, plan name, subscription type, plan amount, trial, etc…
arm_plan_id
(Required)
Get Member Details
This Service will return the member details for the provided User ID in the request.
To get member’s custom details, you can request the API to arm_metakeys
parameter where the User ID is a required parameter and the arm_metakeys
parameter is optional. You can also send request to API with multiple custom field details by comma separated arm_metakeys
.
This API will return JSON array. If API response returned successfully then “status” will received “1” with member details username, email, display name, first name, last name, status, and registretion date.
arm_user_id
(Required)
arm_metakeys
(Optional)
Get Member’s Membership Plans
Get memberโs purchased membership plans and details with a given User ID (mandatory/required parameter). The default record per page to be displayed first will be 5 records which you can set according to your requirement to show the numbers of records, and if the parameter is successful it returns JSON array with all the plan details, plan ID, plan name, plan start date, plan renew date, plan end date, etc…
arm_user_id
(Required)
arm_perpage
(Optional)
(Default: 5)
arm_page
(Optional)
(Default: 1)
Get Member’s Paid Posts
Get memberโs purchased Paid Post details with a given User ID (mandatory/required parameter). The default record per page to be displayed first will be 5 records which you can set according to your requirement to show the numbers of records, and if the parameter is successful it returns JSON array with all the paid post’s details, post name, post’s start date, post’s renew date, post’s end date, etc…
arm_user_id
(Required)
arm_perpage
(Optional)
(Default: 5)
arm_page
(Optional)
(Default: 1)
Get Member’s Plan Payment Transactions
Get memberโs purchased plan payment transaction details with a given User ID (mandatory/required parameter). The default record per page to be displayed first will be 5 records which you can set according to your requirement to show the numbers of records, and if the parameter is successful it returns JSON array with memberโs transactions detail log id, transaction id, plan name, payment gateway name, payment type, status, plan amount, paid amount, tax, discount, etc…
arm_user_id
(Required)
arm_perpage
(Optional)
(Default: 5)
arm_page
(Optional)
(Default: 1)
Get Member’s Paid Post Payment Transactions
Get memberโs purchased pay per post payment transaction details with a given User ID (mandatory/required parameter). The default record per page to be displayed first will be 5 records which you can set according to your requirement to show the numbers of records, and if the parameter is successful it returns JSON array response with memberโs transactions detail log id, transaction id, plan name, payment gateway name, payment type, status, plan amount, paid amount, tax, discount, etc…
arm_user_id
(Required)
arm_perpage
(Optional)
(Default: 5)
arm_page
(Optional)
(Default: 1)
Verify/Check Coupon Code
Checks if the coupon code is available for plan and discount amount of plan, and if the coupon code is available, it returns JSON array response with discount amount, total plan amount after discount, type of discount, discount, and coupon applying information for each subscriptions.
coupon_code
(Required)
plan_id
(Required)
gateway
(Optional)
Assign/Add Plan to Member
Add plan to member with given User ID along with Plan ID (mandatory/required parameters), and if the parameters are correct, it returns status as “1” if successfully assigns plan to the member.
arm_user_id
(Required)
arm_plan_id
(Required)
Add Payment Transaction
Add membership plan and pay per post purchase transaction to member with given User ID along with Plan ID (mandatory/required parameters) along with other parameters as per given below.
Status parameter (Default is pending) varies when status is either successful, canceled, or failed.
Amount parameter passes value without the tax amount. Total parameter passes the value with the tax amount.
arm_user_id
(Required)
plan_id
(Required)
arm_trans_id
(Optional)
gateway
(Optional)
(Default: manual)
arm_status
(Optional)
(Default: pending)
arm_amount
(Optional)
(Default: 0)
arm_total
(Optional)
(Default: 0)
arm_tax_amount
(Optional)
(Default: 0)
coupon_code
(Optional)
is_post_payment
(Optional)
(Default: 0)
is_post_id
(Optional)
(Default: 0)
Cancel Member’s Membership plan
Cancel the membership plan for member with given User ID along with Plan ID (mandatory/required parameters). And if the parameters are correct and the member’s plan is cancelled, it returns “1” indicating the success status.
arm_user_id
(Required)
arm_plan_id
(Required)
Check Member’s Membership
Check whether the memberโs membership plan is Active/Suspend with given User ID along with Plan ID (mandatory/required parameters). And if the parameters are correct and if there was plan found with member id or if the plan is suspended,it returns “1” indicating the success status.
arm_user_id
(Required)
arm_plan_id
(Required)