Jump to content
  • 0

Stripe element gateway


dtravlos

Question

Hello,

I am trying to create a payment gateway using stripe and elements. For one time payment it works ok but I can't figure it out how to make it with subscriptions. I think that it should be handled from WHMCS per each invoice generation(monthly, quarterly etc) and not by creating product and plan on stripe. Is there any sample to see or doc with complete info on whmcs payment gateways?

Thanks

Link to comment
Share on other sites

11 answers to this question

Recommended Posts

  • 0

The way I did mine was to use regular charge API call and not subscriptions as I do overage fees and so the monthly can change and a subscription wouldn't work.   Also, if you need 3dsecure, make sure to start with paymentintents first instead of checkout or regular token creation. 

Link to comment
Share on other sites

  • 0

Completely agree about the WHMCS docs. 

Start with the merchant gateway and the example for that and then add in _remoteinput() for the checkout page and _remoteupdate for the card management page.  Those last two functions expect an HTML form and I found them here on the community and not on the docs so they could be removed at some point but have not found another option yet.  Just return your forms to those functions and have them post back to it and use the functions for any processing.   I have posts on this on this community which may have other details I am forgetting. 

Link to comment
Share on other sites

  • 0

Yes, though webhooks.  https://stripe.com/docs/billing/webhooks  Basically listen for the invoice.payment_succeeded event, find the client in WHMCS based off the customer id given in the event.  You will need to query the database for clients that have a gatewayid of the customer id given.   Then just match up the invoice in WHMCS with the service with the subscription id of the payment. 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated