The createMember API call is used to create a free or paid member on your membership site. It can also be used to change an existing member's membership level. If the email address passed is associated with an existing member and the membership level ID passed is different than the one associated with their account, then MemberMouse will change their membership level and automatically cancel any active subscriptions associated with the current membership.
IMPORTANT: If you choose to pass raw credit card data using this API call, you will be exposed to a higher level of PCI compliance SAQ requirements (SAQ-D). It is your responsibility to ensure that you are in compliance.
Sample Request URL
http://{Your_API_URL}?q=/createMember
Input Parameters
Parameter | Description | Required |
apikey | API key from MemberMouse API Credentials | Yes |
apisecret | API secret from MemberMouse API Credentials | Yes |
membership_level_id | Membership level ID to assign to the new member's account | Yes |
product_id | Each paid membership level you create in MemberMouse will have a default product associated with it. If this field is left blank then the default product will be used to place the order. You can optionally pass a valid product ID that's associated with the membership level here to charge a different price for the membership level then the default product. | No |
email | Email address of the new member | Yes |
username | Username for the new member. If this is not provided the member's email address will be used as their username. | No |
first_name | First name of the new member | No |
last_name | Last name of the new member | No |
password | The password you want to set for the new member. If this is not provided, MemberMouse with automatically generate a password for the new member. | No |
phone | Phone number of the new member | No |
billing_address | billing address of the new member | Conditional (No if membership level is free) |
billing_city | billing city of the new member. | Conditional (No if membership level is free) |
billing_state | billing state of the new member | Conditional (No if membership level is free) |
billing_zip | billing zip code of the new member | Conditional (No if membership level is free) |
billing_country | billing country of the new member (2-digit ISO country code) | Conditional (No if membership level is free) |
credit_number | New member's credit card number | Conditional (No if membership level is free) |
exp_month | Expiration month of the new member's credit card (2 digits) | Conditional (No if membership level is free) |
exp_year | Expiration year of the new member's credit card (4 digits) | Conditional (No if membership level is free) |
security_code | Security code (CVV) of the new member's credit card | Conditional (No if membership level is free) |
shipping_same_as_billing | This can be set to YES or NO. If set to YES you do not need to provide shipping address information. NO is the default value. | Conditional (No if membership level is free) |
shipping_method | Shipping method code of the shipping method you want to apply to the order. You can find shipping method codes on the shipping methods screen in MemberMouse. | Conditional (No if membership level is free or shipping address is the same as billing address) |
shipping_address | shipping address of the new member | Conditional (No if membership level is free or shipping address is the same as billing address) |
shipping_city | shipping city of the new member | Conditional (No if membership level is free or shipping address is the same as billing address) |
shipping_state | shipping state of the new member | Conditional (No if membership level is free or shipping address is the same as billing address) |
shipping_zip | shipping zip code of the new member | Conditional (No if membership level is free or shipping address is the same as billing address) |
shipping_country | shipping country of the new member (2-digit ISO country code) | Conditional (No if membership level is free or shipping address is the same as billing address) |
affiliate_id | Affiliate ID to create with the order | No |
sub_affiliate_id | Sub-affiliate ID to credit with the order | No |
coupon_code | Valid coupon code that you want applied to the order | No |
custom_field_[ID#] | You can pass custom field data to the API by passing one or more parameters in the form custom_field_[ID#] where [ID#] would be replaced with the ID of the custom field as defined in MemberMouse. For example, if the custom field ID is 4, then you would pass data for that custom field by including the parameter custom_field_4. | No |
Response Codes
- 200 – Success
- 409 – Unable to create new member
Response Data
Parameter | Description |
member_id | The ID of the new member in MemberMouse |
email | The new member's email |
username | The new member's username |
password | The new member's password |
confirmationUrl | The URL for the confirmation page associated with the purchase. It has a transaction key attached to it so that MemberMouse SmartTagsā¢ will work on this confirmation page. |