Disable account creation if payment fails

Is there anyways that a user is not registered on the site until after they pay? Some visitors are registering and not paying which is causing confusion, and would prefer users to be only created once the payment is done.

  • Nithin

    Hello Awesome Website Guys,

    Hope you are doing good today. :slight_smile:

    I'm checking this with the developer to see whether there is any quick workaround, and to get back to you regarding this. Please do note that developers work round the clock with many critical issues, and hence have a slow response time. Either myself, or the developer will keep you posted asap.

    Kind Regards,
    Nithin

  • Panos

    Hi Awesome Website Guys ,

    I'm sorry I misunderstood the question earlier :slight_smile:

    First I had the impression this was about failed payments. Let me explain the registration process.

    When a visitor ( not logged in ) selects a membership, it first asks to register ( or login ). Then, after visitor registers, he has options to pay as a logged in user.

    This is how it goes, cause by design it needs to store user information that will be used in payment gateways, mostly used for subscription payments.

    Even if payment fails or gets cancelled the visitor has already registered.

    What I would suggest is to create a function that would select all the registered users that do not have any membership. This can be done in a cron job automatically, or you can view and choose which ones to select.

    The first method, using cron job, is a bit dangerous as you do not have much control of which user it will be removing. It can contain a condition where it will check if registration date is more than a day for example. The second method is safer but it requires you to do this action.

    Please let me know if you agree with my suggestion and with which way you prefer so I could provide a little snipped for it.

    Cheers!

  • Awesome Website Guys

    Hey Panos -

    Thanks for the response here and sorry for the late reply. I was waiting to hear back from my client.

    The question my client keeps asking me is why can't we allow a user to register only after they pay or during the same time as payment. Similar to the way Woocommerce works. Payment and account/registration is all on one page and you cannot register until you pay.

    So can you think of any solution where the payment and registration is on the same page? We are using the stripe gateway.

    A little back story here as well. They only want one option and that is for people to register and pay for their subscription. They do not want anyone to be able to register for their site for any other reason. So at the moment some people are registering and not paying and then being locked out of the site.

    Any info here will help! Thank you!

  • Panos

    Hey Awesome Website Guys ,

    I understand that this might be puzzling your customer, I'll try provide some technical explanation as simple as I can :slight_smile:

    The plugin supports subscriptions which means recurring payments. Stripe and PayPal offer such services through their gateway APIs. Stripe API will store on stripe server information about the customer including name, card info, email, subscription info (amount, recurring period, expiration etc)

    Once the first payment is made from plugin it will send to Stripe all that info ( customer info etc ). Stripe will have to validate this info and process the payment (if customer and card info are valid). After payment is done, Stripe will send a notice about it to plugin so subscription gets activated for the user. In order the plugin to activate the subscription it will need to confirm the customer info included in Stripe's response. This info needs to be stored in user's meta, so user needs to exist before payment.

    Hope his clears it a bit :slight_smile:

    Please let us know if you need any way of removing these users without memberships.

    Thanks!

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.