The purchaseBundle API call is used to purchase a bundle for a member. It can be used to purchase bundles for existing members or to place an initial purchase for new members. For initial purchases for new members, MemberMouse will automatically create a new account, apply the default membership level and then purchase the bundle and apply it to the new account.



Sample Request URL


http://{Your_API_URL}?q=/purchaseBundle



Input Parameters


ParameterDescriptionRequired
apikeyAPI key from MemberMouse API CredentialsYes
apisecretAPI secret from MemberMouse API CredentialsYes
product_idThe ID of the product to charge the member for. This must be a valid product ID that's associated with an active bundle in MemberMouse.Yes
emailEmail address of the member to purchase the bundle forYes
first_nameFirst name of the new memberNo
last_nameLast name of the new memberNo
phonePhone number of the new memberNo
billing_addressbilling address of the new memberYes
billing_citybilling city of the new member.Yes
billing_statebilling state of the new memberYes
billing_zipbilling zip code of the new memberYes
billing_countrybilling country of the new member (2-digit ISO country code)Yes
credit_numberNew member's credit card numberYes
exp_monthExpiration month of the new member's credit card (2 digits)Yes
exp_yearExpiration year of the new member's credit card (4 digits)Yes
security_codeSecurity code (CVV) of the new member's credit cardYes
shipping_same_as_billingThis 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.No
shipping_methodShipping 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 shipping address is the same as billing address)
shipping_addressshipping address of the new memberConditional (No if shipping address is the same as billing address)
shipping_cityshipping city of the new memberConditional (No if shipping address is the same as billing address)
shipping_stateshipping state of the new memberConditional (No if shipping address is the same as billing address)
shipping_zipshipping zip code of the new memberConditional (No if shipping address is the same as billing address)
shipping_countryshipping country of the new member (2-digit ISO country code)Conditional (No if shipping address is the same as billing address)
affiliate_idAffiliate ID to create with the orderNo
sub_affiliate_idSub-affiliate ID to credit with the orderNo
coupon_codeValid coupon code that you want applied to the orderNo

Response Codes


  • 200 - Success

  • 409 - Unable to add bundle


Response Data


ParameterDescription
confirmation_urlThe URL for the confirmation page associated with the purchase. It has a transaction key attached to it so that MemberMouse SmartTags will work on the confirmation page.