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

  • Home
  • SEARCH
  • 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 8987783
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T21:52:26+00:00 2026-06-15T21:52:26+00:00

Using the Recurly API, the following text is returned. What I’m trying to figure

  • 0

Using the Recurly API, the following text is returned. What I’m trying to figure out is the easiest way with PHP to extract values from this string and place them into PHP variables.

I’ve looked at various methods within the PHP manual to find text but being new to PHP the exact process to actually get the values after I’ve found their location still not apparent to me.

For example, how would I pull the value for plan_code and remove the quotes around the value so that the result is $plan = 'starter'?

Recurly_Subscription[href=https://api.recurly.com/v2/subscriptions/xxxxxxxxxxxxxxxxxxxxxxxxxxxx]
account=<Recurly_Stub[account]
href=https://api.recurly.com/v2/accounts/1>,
activated_at=”2012-07-14 12:55:47 +00:00″, currency=”USD”,
current_period_ends_at=”2012-08-14 12:55:47 +00:00″,
current_period_started_at=”2012-07-14 12:55:47 +00:00″,
plan=”Recurly_Plan[href=https://api.recurly.com/v2/plans/starter]
name=”Starter”, plan_code=”starter”,
setup_fee_in_cents=”<Recurly_CurrencyList []>”,
unit_amount_in_cents=”<Recurly_CurrencyList []>”>”,
quantity=2, state=”active”, subscription_add_ons=[],
unit_amount_in_cents=1200,
uuid=”1xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx3″

  • 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-15T21:52:27+00:00Added an answer on June 15, 2026 at 9:52 pm

    You can use Recurly’s PHP API:

    $result = Recurly_js::fetch($_POST['recurly_token']);
    $plan = $result->plan_code;
    

    The token is a subscription object. You can then retrieve additional information about the account and its billing information like this:

    $account = $result->account->get();
    $billing = $account->billing_info->get();
    

    Retrieve fields from the account (e.g. account holder first name) and its billing info (e.g. last 4 digits of credit card number of record) the same way plan_code is fetched above.

    Doing the above is much easier than finding how to do so in Recurly’s documentation!

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

Sidebar

Related Questions

I'm trying to call the Recurly REST API using the Hammock C# library for
Using the following text as my msg variable: /private UserName:some message without leading whitespace
Using SQL Server 2008 R2 we are looking for a way to select the
Using Microsoft SQL Server 2005, is there any way to see when a table
Using InteliJ IDEA , I am trying to set up multiple projects to run
Using the Qt library, is there a way to automatically update a QDateTimeEdit using
Using the following as an example (with $db being a previously created database connection
Using Tsql, how can I find out when MS SQL server was installed?
Using the following database table structure: Order Table: OrderId OrderName OrderItem Table: OrderId ItemId
Using this code, the following execution yields strange results: C 100 R W The

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.