Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


Stripe integration
New on LowEndTalk? Please Register and read our Community Rules.

Stripe integration

I need a bit of guidance. Integrating Stripe and I'am lost what that beast of API can do. My target is to save clients CC after payment, so any other time client does not have to enter CC details again. I can't find way to do that according to official Stripe docs. Off-session payments - ok, I understand that, but how to save and pre-fill CC details for the client? PaymentIntent does not cover this...

Can anyone provide some sample of modern stripe integration in PHP/Jquery?

Comments

  • marianmarian Member
    edited September 12

    @LTniger said: My target is to save clients CC

    Short answer: DON'T!

    Long answer: maybe you are looking in the wrong direction. Look for terms like "subscription" and Stripe can handle that. But saving CC info and prefill on next payment is not an option.

  • @marian said:

    @LTniger said: My target is to save clients CC

    DON'T!

    Not in the server! In stripe and than pre-fill loaded stripe CC form with saved details.

  • You create a PaymentIntent and either use Stripe Checkout or Stripe Elements to handle getting your customer's card details for you

    Stripe then gives you a token you can associate with a customer object within Stripe, you then charge this customer (or that particular card) using the customer id or the card id. You never see or store anything to do with the card. Stripe handles this entirely for you

    Thanked by 1v3ng
  • Yes, as far as I know Stripe has an option to save CC details for future payments, but that option is up to the customer if they want to opt in. There is a checkbox in the payment window where you can tick it or no.

    Another option: https://stripe.com/docs/payments/save-during-payment

  • WebProjectWebProject Member, Host Rep
    edited September 12

    Highly recommend not to save any CC on your server as Stripe be able to handle more secure and if customer pay manually every month so you as provider get more protection (check Stripe payment options).

  • Does anyone has an example of working app/integration with Stripe in PHP?

  • v3ngv3ng Member, Patron Provider

    have you checked their documentation?

    There are many code examples, if you want to get it up and running quickly you could also use their hosted checkout portal

  • @v3ng said:
    have you checked their documentation?

    There are many code examples, if you want to get it up and running quickly you could also use their hosted checkout portal

    Those examples are generalized, I would like to see live integration practices.

  • Looks like your WP hosting site is doing good business.

  • @alilet said: Looks like your WP hosting site is doing good business.

    Don't know, sold long time ago. Thank you for note.

    Thanked by 1alilet
  • v3ngv3ng Member, Patron Provider

    @LTniger said:

    @v3ng said:
    have you checked their documentation?

    There are many code examples, if you want to get it up and running quickly you could also use their hosted checkout portal

    Those examples are generalized, I would like to see live integration practices.

    Huh?
    Their API has probably the best documentation out there, most examples are pretty much ready for copy n paste.

    What exactly are you trying to do? If you have any specific questions feel free to contact me, I’ve worked with quite a few payment gateways in the past

  • @v3ng said: What exactly are you trying to do?

    I'am trying to achieve this functionality:

    1. Customer order service;
    2. Visits invoice and submits first CC payment;
    3. Payment verified;
    4. After this, used CC details saved at Stripe;
    5. After 1 month customer visits another invoice and now see Stripe Element form pre-loaded with his previous payment method details;

    Is this possible?

  • v3ngv3ng Member, Patron Provider
    edited September 12

    Stripe should automatically save the payment method for later use .

    You’d then show the customer the last 4 digits of the currently saved card and let the user decide if he wants to use the earlier added card or replace it with a new one.

    You could do this with a combination of their hosted checkout page and billing portal for instance

    Edit:
    Your application has to listen to stripes webhook events, once you get the payment confirmation you can provision the service

    Thanked by 1LTniger
  • jiggawattzjiggawattz Member
    edited September 12

    .

Sign In or Register to comment.