MemberSpace API
  • Welcome
  • Getting Started
    • Install Code
      • Multi-subdomain site
    • Using query parameters
  • Javascript API
    • Signature
      • Events
        • MemberSpace.ready
        • MemberSpace.member.info
        • MemberSpace.member.logout
        • MemberSpace.member.registration
        • MemberSpace.conversion
      • Functions
        • MemberSpace.getMemberInfo
        • MemberSpace.getMemberMetadata
        • MemberSpace.updateMemberMetadata
        • MemberSpace.clearMemberMetadata
      • Flags
        • MemberSpace.ready
      • Structures
        • MemberInfo
    • Guides
      • Getting Member Information - SSR
      • Getting Member Information - SPA
    • Migration Guide
  • Protecting content
    • Showing/Hiding Elements
  • Embedding
    • Member Information
      • Embedding Member Info
      • Prefilling Forms
      • Available Data Types
  • Links
    • Help Center
    • Admin
    • Sign Up
Powered by GitBook
On this page

Was this helpful?

  1. Javascript API
  2. Signature
  3. Structures

MemberInfo

This object contains information about the member, the plan(s) the member is on (memberships), and custom fields.

{
  id: 115,
  name: "John Doe",
  firstName: "John",
  lastName: "Doe",
  email: "john.doe@testdomain.com",
  profileImageUrl: "https://memberspace.s3.us-east-1.amazonaws.com/store/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.jpg",
  memberships: [
    {
      id: 13579,
      planId: 151,
      publicPlanId: "abc123",
      name: "Super plan",
      type: "subscription",
      createdAt: "2021-03-24T15:31:55Z",
      status: "active",
      // cancelsOn [ ISO-8601 | undefined ] indicates that a recurring
      // **subscription** is being cancelled at the billing period end
      cancelsOn: "2022-03-24T15:31:55Z",
      // billingPeriodEnd [ ISO-8601 | udnefined ] indicates that when the next charge
      // on a **subscription or non-completed multi_payment** is due.
      billingPeriodEnd: "2022-03-24T15:31:55Z"
      paymentFailure: true,
      welcomeUrl: "/welcome-to-super-plan",
      contentUrl: "/super-plan-content"
    },
    {
      id: 13580,
      planId: 52,
      publicPlanId: "cde345",
      name: "Free plan",
      type: "free",
      createdAt: "2020-05-26T10:11:40Z",
      status: "active",
      // expiresOn [ ISO-8601 | udnefined ] indicate that a **non-subscription** is
      // due to expire at a specific date.
      expiresOn: "2022-03-24T15:31:55Z"
      paymentFailure: false,
      welcomeUrl: "/welcome-to-basic-plan",
      contentUrl: "/basic-plan-content"
    }
  ],
  customSignupFields: [
    {
      id: 21,
      type: "textarea",
      required: true,
      value: "Consectetur porro adipisci in possimus vero. Adipisci voluptas doloribus doloremque sint error id."
    },
    {
      id: 22,
      type: "text",
      required: true,
      value: "red"
    },
    {
      id: 23,
      type: "select",
      required: true,
      options: [
        { label: "D1", value: "D1" },
        { label: "D2", value: "D2" },
        { label: "D3", value: "D3" }
      ],
      value: "D1"
    },
    {
      id: 24,
      type: "multiple-select",
      required: true,
      options: [
        { label: "MO1", value: "MO1" },
        { label: "MO2", value: "MO2" },
        { label: "MO3", value: "MO3" }
      ],
      value: [ "MO1", "MO3" ]
    },
    {
      id: 25,
      type: "checkbox",
      required: true,
      value: true
    },
    {
      id: 34,
      type: "checkbox",
      required: true,
      value: false
    }
  ]
}

Attributes

Name

Data Type

Description

id

integer

name

string

full name of member

firstName

string

lastName

string

email

string

profileImageUrl

string

url of where they profile image is

memberships

Membership[]

a list of all of the plans a member belongs to

customSignupFields

CustomSignupField[]

a list of all of the members custom fields

PreviousStructuresNextGuides

Last updated 6 months ago

Was this helpful?

Represents the state of the user at the moment of calling the function or receiving it in an . As the data changes events are dispatched to publish the updated information.

getter
event
MemberSpace.member.info