Hello,
I’m using Stripe on a Woocommerce shop that runs on a subdomain. Stripe told me that they get a 307 code when trying to reach the webhook endpoint https://boutique.revue-ballast.fr/?wc-api=wc_stripe
The rest of the website works fine, including the Stripe API.
I’ve explored several potential causes, including caching plugin and htaccess rules, with no success. After talking to Stripe and Woocommerce support, as well as my host, it seems the issue comes from Cloudflare, and maybe from my SSL configuration. Here is the curl command to reproduce the error :
$ curl -vvvv https://boutique.revue-ballast.fr/?wc-api=wc_stripe -d '{}'
* Trying 104.24.99.254:443...
* TCP_NODELAY set
* Connected to boutique.revue-ballast.fr (104.24.99.254) port 443 (#0)
* ALPN, offering h2
* ALPN, offering http/1.1
* successfully set certificate verify locations:
* CAfile: /etc/ssl/certs/ca-certificates.crt
CApath: /etc/ssl/certs
* TLSv1.3 (OUT), TLS handshake, Client hello (1):
* TLSv1.3 (IN), TLS handshake, Server hello (2):
* TLSv1.3 (IN), TLS handshake, Encrypted Extensions (8):
* TLSv1.3 (IN), TLS handshake, Certificate (11):
* TLSv1.3 (IN), TLS handshake, CERT verify (15):
* TLSv1.3 (IN), TLS handshake, Finished (20):
* TLSv1.3 (OUT), TLS change cipher, Change cipher spec (1):
* TLSv1.3 (OUT), TLS handshake, Finished (20):
* SSL connection using TLSv1.3 / TLS_AES_256_GCM_SHA384
* ALPN, server accepted to use h2
* Server certificate:
* subject: C=US; ST=CA; L=San Francisco; O=Cloudflare, Inc.; CN=sni.cloudflaressl.com
* start date: Jun 11 00:00:00 2020 GMT
* expire date: Jun 11 12:00:00 2021 GMT
* subjectAltName: host "boutique.revue-ballast.fr" matched cert's "*.revue-ballast.fr"
* issuer: C=US; O=Cloudflare, Inc.; CN=Cloudflare Inc ECC CA-3
* SSL certificate verify ok.
* Using HTTP2, server supports multi-use
* Connection state changed (HTTP/2 confirmed)
* Copying HTTP/2 data in stream buffer to connection buffer after upgrade: len=0
* Using Stream ID: 1 (easy handle 0x56319c67edb0)
> POST /?wc-api=wc_stripe HTTP/2
> Host: boutique.revue-ballast.fr
> user-agent: curl/7.68.0
> accept: */*
> content-length: 2
> content-type: application/x-www-form-urlencoded
>
* We are completely uploaded and fine
* TLSv1.3 (IN), TLS handshake, Newsession Ticket (4):
* TLSv1.3 (IN), TLS handshake, Newsession Ticket (4):
* old SSL session ID is stale, removing
* Connection state changed (MAX_CONCURRENT_STREAMS == 256)!
< HTTP/2 307
< date: Wed, 23 Sep 2020 10:02:46 GMT
< content-type: text/html; charset=utf-8
< set-cookie: __cfduid=d26ea75dd20e8e6f239053241af3fb09d1600855366; expires=Fri, 23-Oct-20 10:02:46 GMT; path=/; domain=.revue-ballast.fr; HttpOnly; SameSite=Lax; Secure
< cache-control: private, max-age=0, no-cache
< expires: Mon, 01 Jan 2000 01:01:42 GMT
< set-cookie: o2s-chl=e48e57c98a7b6cee2c96380cad24b7cddce48bb43771a54e87f856b1575b9b18; path=/
< location: https://boutique.revue-ballast.fr/?wc-api=wc_stripe
< cf-cache-status: DYNAMIC
< cf-request-id: 055c03729000000883821ef200000001
< expect-ct: max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"
< server: cloudflare
< cf-ray: 5d736e974b0b0883-CDG
< alt-svc: h3-27=":443"; ma=86400, h3-28=":443"; ma=86400, h3-29=":443"; ma=86400
<
* Connection #0 to host boutique.revue-ballast.fr left intact
Any suggestions would be appreciated! Thanks for your help.