Tips and Tricks HQ Support

Support site for Tips and Tricks HQ premium products

  • Home
  • Contact Us
  • Documentation
  • Forum Home
    • Forum
    • Forum Search
    • Forum Login
    • Forum Registration

Stripe – Use Customer Abstraction

by

Tips and Tricks HQ Support Portal › Forums › WP eStore Forum › WP eStore Addon Related › Stripe – Use Customer Abstraction

Tagged: stripe

  • This topic has 31 replies, 4 voices, and was last updated 8 years, 9 months ago by Robert.
Viewing 15 posts - 1 through 15 (of 32 total)
1 2 3 →
  • Author
    Posts
  • August 8, 2013 at 5:57 pm #9451
    Robert
    Participant

    According to Stripe documentations:

    “Instead of charging the card immediately, you can create a new Customer object and save the card to that customer. This will let you charge the user at any point in the future:”

    // Set your secret key: remember to change this to your live secret key in production

    // See your keys here [https://manage.stripe.com/account]

    Stripe::setApiKey(“sk_test_2OlQkgmBN5DRJ19zPlo0fwqg”);

    // Get the credit card details submitted by the form

    $token = $_POST;

    // Create a Customer

    $customer = Stripe_Customer::create(array(

    “card” => $token,

    “description” => “payinguser@example.com”)

    );

    // Charge the Customer instead of the card

    Stripe_Charge::create(array(

    “amount” => 1000, # amount in cents, again

    “currency” => “usd”,

    “customer” => $customer->id)

    );

    Would it be possible to update the Stripe functionality to process Stripe payments this way so the Stripe Customer Dashboard can be used for certain payments to a customer? This would in effect be an easy way to manually handle subscriptions with Stripe and would appear fairly simple since the data is entered on the “Collection Details” page and stored in the eStore database anyways.

    Their above code example appears to create the customer object and then charge the customer. This would achieve the payment as well as allow for the future payments within the Stripe Dashboard.

    Thanks,

    Robert

    August 12, 2013 at 3:34 pm #57011
    Robert
    Participant

    Just wondering if anyone has had a chance to look into this?

    August 12, 2013 at 11:39 pm #57012
    admin
    Keymaster

    Hi, What you have there should work. We plan to implement the stripe subscription using their subscription API though.

    August 13, 2013 at 1:27 am #57013
    Robert
    Participant

    Not really sure how/where to update the code. Any chance of adding this functionality into the Gateway Add-On?

    August 13, 2013 at 10:57 pm #57014
    admin
    Keymaster

    Not until we have added the stripe subscription. Our hands are full with payment gateway work.

    August 14, 2013 at 12:10 am #57015
    Robert
    Participant

    Ok, any timeline for the strip subscription?

    August 14, 2013 at 8:01 am #57016
    admin
    Keymaster

    Can’t say for sure. I will start working on that after I finish the bitcoin integration (via bitpay).

    August 14, 2013 at 6:32 pm #57017
    Robert
    Participant

    Ok, thanks for the update.

    November 4, 2013 at 3:14 am #57018
    Robert
    Participant

    Any updates on the Strip Subscription availability?

    November 4, 2013 at 4:41 am #57019
    morley
    Member

    This would be great not only for subscriptions but also for regular purchases. For instance, if a customer made an initial payment through Stripe and opted to create an eMember account and store his or her card information, that customer could then use the stored method for later purchases. It would essentially make card payments for members as streamlined as they are for PayPal account holders.

    May 12, 2016 at 1:37 am #57020
    Robert
    Participant

    I know the Stripe subscription option has now been added, but any news on updating the Stripe functionality as described above so that it creates customers in the Stripe system and then charges the customers instead of just making a direct charge?

    This would allow for charging a customer directly from the Stripe Dashboard if the customer wants to simply “re-purchase” a product without having to go to the website and make a purchase.

    We get calls from customers asking us to do this, but can’t unless we hold their credit card information which creates a security risk for us.

    As I’m sure you know, this also opens up the door for: (from Stripe’s website)

    “After creating a customer in Stripe with a stored payment method, you can charge that customer at any point in time by passing the customer ID—instead of a card representation—in the charge request. Be certain to store the customer ID on your side for later use.”

    This would be a significant improvement in the Stripe functionality for eStore.

    I’m not asking for any custom coding, just a simple update to the current Stripe processing.

    July 22, 2016 at 6:37 pm #57021
    Robert
    Participant

    Any word on this enhancement?

    July 23, 2016 at 6:19 am #57022
    wpCommerce
    Moderator

    @Robert, We have a version ready for testing. I have sent you a copy via email. Let me know if you don’t receive it.

    July 23, 2016 at 6:06 pm #57023
    Robert
    Participant

    That’s fantastic. Found the email (it went in to my spam folder). I’ll start testing and let you know the results.

    July 23, 2016 at 7:26 pm #57024
    Robert
    Participant

    It looks like things are working well. The only caveat is that it appears to create a new customer for every charge.

    This may be beyond what you’re interested in doing, but I’ll throw it out there for you to decide….but to take full advantage of the customer object in Stripe…

    With Stripe, since you are now creating a customer object, you can charge the same customer object by simply storing the customer ID that Stripe assigns when you created the customer, then using that same customer ID for future charges instead of creating a new customer every time.

    Now, from your end I realize this really doesn’t make sense from just the eStore perspective, because you’d never know what customer ID to use, BUT, if the person was using eMember along with eStore (as I am), then you would simply associate the customer ID with the eMember ID and use it when creating a new charge.

    This is basically the same as showing a customers order history when they are using both eStore and eMember.

    The real benefit here is that on Stripe, instead of having a new customer created for each and every charge a customer makes, there would just be one customer with all their charges.

    Of course, this would be null and void if the customer isn’t logged in with eMember when they make their purchases (just like you can’t show them their purchase history if they’re not logged in when they make a purchase).

    This would be a fantastic integration of eStore, eMember and Stripe.

    So, I realize this is a long description and may be more than you’re interested in doing, but I thought I’d lay it out anyways.

    Thanks again for updating the Stripe functionality to this point, it is greatly appreciated and will at least allow us to charge customers who call and want to “re-purchase” something over the phone (actually, we’ll also be able to use it as a “manual subscription” style purchase…what we call autoship purchases, where you buy a product (add to cart style)and want to receive it every 10 weeks.)

  • Author
    Posts
Viewing 15 posts - 1 through 15 (of 32 total)
1 2 3 →
  • You must be logged in to reply to this topic.
Log In

Forum Related

  • Forum Home
  • Forum Search
  • Forum Registration
  • Forum Login

Support Related Forms

  • Contact Us
  • Customer Support
  • Request a Plugin Update
  • Request Fresh Download Links

Useful Links

  • Plugin Upgrade Instructions
  • WP eStore Documentation
  • WP eMember Documentation
  • WP Affiliate Platform Documentation
  • Tips and Tricks HQ Home Page
  • Our Projects

Quick Setup Video Tutorials

  • WP eStore Video Tutorial
  • WP eMember Video Tutorial
  • WP Affiliate Platform Video Tutorial
  • Lightbox Ultimate Video Tutorial

Our Other Plugins

  • WP Express Checkout
  • Stripe Payments Plugin
  • Simple Shopping Cart Plugin
  • Simple Download Monitor

Copyright © 2025 | Tips and Tricks HQ