Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9221375
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T03:33:59+00:00 2026-06-18T03:33:59+00:00

I am able to retrieve the first 4 values fine, but $item_name is eluding

  • 0

I am able to retrieve the first 4 values fine, but $item_name is eluding me. What is wrong with the syntax I’m using to retrieve the plan: name: “LITE” value

this is my php – the first 4 return fine but $item_name returns invalid.

    $customer = $event_json->data->object->customer;
    $amount = $event_json->data->object->total;
    $period_end = $event_json->data->object->period_end;
    $paid = $event_json->data->object->paid;
    $item_name = $event_json->data->object->lines->data->plan->name;

and this is what is being sent from Stripe

{
  "id": "evt_1CTCF3tibBeC2y",
  "created": 1359565368,
  "livemode": false,
  "type": "invoice.payment_succeeded",
  "data": {
    "object": {
      "period_end": 1359565367,
      "charge": "ch_1CTCMvOgHE1Q9K",
      "discount": null,
      "period_start": 1359565367,
      "livemode": false,
      "customer": "cus_1CTCYQNoghibwb",
      "amount_due": 7500,
      "lines": {
        "count": 1,
        "object": "list",
        "url": "/v1/invoices/in_1CTCCBbENUpsE6/lines",
        "data": [
          {
            "type": "subscription",
            "livemode": false,
            "period": {
              "end": 1391101367,
              "start": 1359565367
            },
            "object": "line_item",
            "proration": false,
            "plan": {
              "trial_period_days": null,
              "livemode": false,
              "interval": "year",
              "object": "plan",
              "name": "LITE",
              "amount": 7500,
              "currency": "usd",
              "id": "LITE",
              "interval_count": 1
            },
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T03:34:00+00:00Added an answer on June 18, 2026 at 3:34 am

    Data is an array:

    $item_name = $event_json->data->object->lines->data[0]->plan->name;
    

    Right?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm able to retrieve the current location in my iPad application using, CLLocation *location
Currently I am able to retrieve data from a MySQL db by using HTTP
I am able to retrieve information from a SQLite database in PHP, but not
I am trying to retrieve the values of 'Title' using the following codes: private
I have been able to retrieve values into my form.The values are inserted into
I am parsing the XML using Nokogiri. I am able to retrieve the stylesheets.
I am able to retrieve the sum/total sales for all items in a particular
I am not able to retrieve the data from the server. I am not
i'm be able to retrieve the region format of the user, ad example it_IT
In PHP I am able to retrieve information from a db like so: <?php

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.