webhooks stripe configuration



  • Hello,

    I have noticed that stripe did not update statuses of some payments.
    e.g via German payments methods e.g Sofort Banking. Some take some time.

    To use it it need to be configured webhooks.

    Is there any docs/info how to do that?

    In module there is a link:
    https://www.yourshop.com/module/stripe/hook
    Is it correct?
    Modules or modules?

    Webhooks can be add here:
    https://dashboard.stripe.com/account/webhooks

    add link

    more info:
    https://stripe.com/docs/webhooks

    Which type of events should be selected?


  • administrators

    Hey, are you using Stripe nowadays? I thought it wasn’t available in Poland, yet, but then I saw this: https://stripe.com/docs/sources/p24
    Should we add P24? Is it worth it?

    Sorry for going off-topic, to actually answer answer your questions:

    Is there any docs/info how to do that?

    There’s not much to it, it is just copying and pasting your link onto your settings panel.

    Is it correct?

    Yes, it is correct

    Which type of events should be selected?

    You can add all events, we will likely extend the module’s functionality in the future.



  • This post is deleted!


  • Hi Mike,

    I don’t know about the Poland how it looks.
    I have UK account and we use stripe for worldwide payments.

    Some info and history:
    Regards Poland p24 are instant payments (direct from bank account, this ones which are introducing now in Germany and Netherlands) one of the biggest provider.
    In Poland instants payments are from around 2000. P24 are from 11years.
    I am not sure if p24 is the cheapest provider, because in Polish market there are many providers of instant payments. I believe that there is no extra charges as they have agreement with stripe.
    Because Poland was in the end of banking system at the moment Poland have one of the newest banking solutions in the world.
    I don’t know whole world but can compare with banks in UK, DE which I know and I was using it.
    In Poland 90% or more people pay via direct instant payments then via credit/debit cards or let’s say if they can choose pay by instant they will pay by instant payment. This is for online payments. I am talking for customers not for companies.
    In shops people pay via cards usually touch less cards >> https://en.wikipedia.org/wiki/Proximity_card

    This is some info, every country have different and people are used to this or that payments methods.

    Adding this payments definitely will open a market for Polish merchants and customers.



  • PS. I have add a hooks I will give know if now German payments will be automatic updated via this webhook.

    Is there anything to do with Signing secret, this is webhooks?
    https://dashboard.stripe.com/webhooks/



  • hi,

    webhooks is http of https?

    Module shows: You can use the following url: http://domainname/module/stripe/hook

    But website has been enabled to https for all pages.

    Please help. tks.



  • I mean http or https?



  • Hi I did webhook test. It shows Test webhook error: 500

    Please help how to solve this issue:

    Request
    {
    “created”: 1326853478,
    “livemode”: false,
    “id”: “evt_00000000000000”,
    “type”: “account.external_account.created”,
    “object”: “event”,
    “request”: null,
    “pending_webhooks”: 1,
    “api_version”: “2017-08-15”,
    “data”: {
    “object”: {
    “id”: “ba_00000000000000”,
    “object”: “bank_account”,
    “account”: “acct_00000000000000”,
    “account_holder_name”: “Jane Austen”,
    “account_holder_type”: “individual”,
    “bank_name”: “STRIPE TEST BANK”,
    “country”: “US”,
    “currency”: “usd”,
    “default_for_currency”: false,
    “fingerprint”: “KD8DJ40MSyBLODeS”,
    “last4”: “6789”,
    “metadata”: {
    },
    “routing_number”: “110000000”,
    “status”: “new”
    }
    }
    }

    Response
    Test webhook error: 500

    Response

    <!DOCTYPE html>
    <html lang=“en”>
    <head>
    <meta http-equiv=“Content-Type” content=“text/html; charset=utf-8” />
    <meta name=“description” content=“This store is powered by PrestaShop” />
    <style>
    ::-moz-selection {
    background: #b3d4fc;
    text-shadow: none;
    }

            ::selection {
                background: #b3d4fc;
                text-shadow: none;
            }
    
            html {
                padding: 30px 10px;
                font-size: 16px;
                line-height: 1.4;
                color: #737373;
                background: #f0f0f0;
                -webkit-text-size-adjust: 100%;
                -ms-text-size-adjust: 100%;
            }
    
            html,
            input {
                font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
            }
    
            body {
                max-width:600px;
                _width: 600px;
                padding: 30px 20px 50px;
                border: 1px solid #b3b3b3;
                border-radius: 4px;
                margin: 0 auto;
                box-shadow: 0 1px 10px #a7a7a7, inset 0 1px 0 #fff;
                background: #fcfcfc;
            }
    
            h1 {
                margin: 0 10px;
                font-size: 50px;
                text-align: center;
            }
    
            h1 span {
                color: #bbb;
            }
            h2 {
                color: #fad629;
                margin: 0 10px;
                font-size: 40px;
                text-align: center;
            }
    
            h2 span {
                color: #bbb;
                font-size: 60px;
            }
    
            h3 {
                margin: 1.5em 0 0.5em;
            }
    
            p {
                margin: 1em 0;
            }
    
            a {
                color: #d8b81c;
            }
    
            ul {
                padding: 0 0 0 40px;
                margin: 1em 0;
            }
    
            .container {
                max-width: 380px;
                _width: 380px;
                margin: 0 auto;
            }
    
            input::-moz-focus-inner {
                padding: 0;
                border: 0;
            }
    
            pre {
                white-space: pre-wrap;       /* Since CSS 2.1 */
                white-space: -moz-pre-wrap;  /* Mozilla, since 1999 */
                white-space: -pre-wrap;      /* Opera 4-6 */
                white-space: -o-pre-wrap;    /* Opera 7 */
                word-wrap: break-word;       /* Internet Explorer 5.5+ */
                width: 400px;
            }
        </style>
    </head>
    <body>
        <div class="container">
            <h2 id="errorTitle"><span>500</span> Server Error</h2>
            <p id="errorMessage">Oops, something went wrong.<br /><br />Try to refresh this page or feel free to contact us if the problem persists.</p>
            <pre><code id="encryptedError"> 
        </div>
        <script type="text/javascript">
          (function() {
            var encryptedError = document.getElementById('encryptedError');
            var previousmessage = encryptedError.innerHTML;
            var copyBtn = '<a href="javascript:copyAllText();" id="copyError" title="Copy">Copy Error</a><br/>';
    
            window.readAll = function() {
              encryptedError.innerHTML = copyBtn + '<span id="errorContent">' + previousmessage + '</span>';
            };
    
            window.copyAllText = function() {
                var errorContent = document.getElementById('errorContent');
                var range = document.createRange();
                range.selectNodeContents(errorContent);
                var sel = window.getSelection();
                sel.removeAllRanges();
                sel.addRange(range);
                try {
                    succeed = document.execCommand("copy");
                } catch(e) {
                    succeed = false;
                }
                if(succeed)
                    alert('Encrypted error copied!')
                else
                    alert('Error, try copying manually')
            }
    
            encryptedError.innerHTML = '<a href="javascript:readAll();">' + previousmessage.substring(0, 20) + '...</a>';
    
            var translations = {
              en: {
                errorTitle: '<span>500</span> Server Error',
                errorMessage: 'Oops, something went wrong.<br /><br />Try to refresh this page or feel free to contact us if the problem persists.<br/>Please make sure to expand and include the following error code in your message, so we can help you better:',
              },
              nl: {
                errorTitle: '<span>500</span> Serverfout',
                errorMessage: 'Oops, er ging iets mis.<br /><br />Probeer deze pagina te vernieuwen of neem contact op als dit het probleem niet verhelpt.<br/>Om u beter te van dienst te kunnen zijn, kunt u de onderstaande foutcode uitklappen en toevoegen aan uw bericht?',
              }
            };
            var browserLanguage = window.navigator.userLanguage || window.navigator.language;
            if (typeof translations[browserLanguage] === 'undefined') {
              if (typeof translations[browserLanguage.substring(0, 2)] !== 'undefined') {
                browserLanguage = browserLanguage.substring(0, 2);
              } else {
                browserLanguage = 'en';
              }
            }
            document.getElementById('errorTitle').innerHTML = translations[browserLanguage].errorTitle;
            document.getElementById('errorMessage').innerHTML = translations[browserLanguage].errorMessage;
    
    
          }());
        </script>
    </body>
    

    </html>


  • administrators

    How did you generate that test? It cannot process that because it’s an unknown call and customer. That’s why you see 500.



  • I did the test in Stripe.

    for the live mode, I have been getting this email from stripe:

    "We’re contacting you because we’re still having trouble delivering data to a webhook endpoint associated with your violinparts.net account in live mode. Webhooks are used to notify your server about events that happen in your Stripe account, such as a payout completing or an invoice being created. The failing webhook endpoint is http://violinparts.net/module/stripe/hook. …

    We’ve attempted to notify the endpoint 144 times since September 26 at 11:58PM. If this endpoint is important to your application, please try and fix the issue. If you do not need the webhook endpoint you can delete it from your Stripe webhook settings. We will stop sending notifications to your webhook by October 08. This email is the last time we’ll reach out to you before disabling the webhook…

    One recent call to your endpoint returned an HTTP status code 500, which signals a server error on your end. You may want to check your system logs to get more information about the error… "

    I wonder if it’s module error or server error.

    My hoster - cloudways - says it does not see any error regarding Stripe.

    Should I use Url with http or https for webhook?



  • Stripe encourrages you to do test data to test webhook.

    Clik on viewing test data then create a test mode. click on test, then clock on Send Test Webhook.

    The error from the live mode is the same as error from test mode.

    tks.



  • The error from the live mode is the same as error from LIVE mode.



  • have you add your webhook here?
    https://dashboard.stripe.com/account/webhooks

    please note to double check the link or copy and paste.

    https://violinparts.net/module/stripe/hook



  • Yes. I did that - used the url exactly in weebhook - stripe dashboard…

    I used https initially. I got the error email from Stripe.

    Then I tried http. I still got error email Stripe.

    The same email as you see above.

    So, I wonder if its module error or server error.

    Cloudways support people say they see no error related to stripe in server log

    Essentially Striped points to this error:

    "We’re contacting you because we’re still having trouble delivering data to a webhook endpoint associated with your violinparts.net account in live mode. Webhooks are used to notify your server about events that happen in your Stripe account, such as a payout completing or an invoice being created. The failing webhook endpoint is http://violinparts.net/module/stripe/hook. …

    We’ve attempted to notify the endpoint 144 times since September 26 at 11:58PM. If this endpoint is important to your application, please try and fix the issue. If you do not need the webhook endpoint you can delete it from your Stripe webhook settings. We will stop sending notifications to your webhook by October 08. This email is the last time we’ll reach out to you before disabling the webhook…

    "One recent call to your endpoint returned an HTTP status code 500, which signals a server error on your end. You may want to check your system logs to get more information about the error… "


  • administrators

    Hmmz, got it. Stripe does not seem to care about the processing. It just wants to see a 2xx as an acknowledgement of receipt.

    Make sure you remove the webhook endpoint and add it again (use https). We’ll adjust the module accordingly this weekend. That should give you enough time to keep the webhook up and running.


  • administrators

    Also, not sending any test requests, only using these events and the latest webhook version should keep it up and running for now:

    0_1507305422639_webhookendpoint.png


  • administrators

    Update is now available in the module feed. The problem should be solved by updating to 1.4.1



  • Just updated to 1.4.1 Thanks!!


Log in to reply
 

Looks like your connection to thirty bees forum was lost, please wait while we try to reconnect.